View Oscar_bot_Chroma.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import openai | |
import chromadb | |
from chromadb.utils import embedding_functions | |
import os | |
df=pd.read_csv('./data/oscars.csv') | |
df=df.loc[df['year_ceremony'] == 2023] | |
df=df.dropna(subset=['film']) |
View chroma-vdb.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chromadb | |
phrases=[ | |
"Amanda baked cookies and will bring Jerry some tomorrow.", | |
"Olivia and Olivier are voting for liberals in this election.", | |
"Sam is confused, because he overheard Rick complaining about him as a roommate. Naomi thinks Sam should talk to Rick. Sam is not sure what to do.", | |
"John's cookies were only half-baked but he still carries them for Mary.", | |
] | |
ids=["001","002","003","004"] |
View Oscar_bot.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import openai | |
import tiktoken | |
from scipy import spatial | |
import pandas as pd | |
df=pd.read_csv('./data/oscars.csv') | |
print(df.head()) | |
df=df.loc[df['year_ceremony'] == 2023] | |
df=df.dropna(subset=['film']) |
View apps.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 | |
kind: Kustomization | |
metadata: | |
name: app | |
namespace: flux-system | |
spec: | |
interval: 1m | |
sourceRef: | |
kind: GitRepository | |
name: flux-system |
View webapp-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.k8s.io/v1 | |
kind: Ingress | |
metadata: | |
name: mywebapp-ingress | |
namespace: mywebapp | |
annotations: | |
kubernetes.io/ingress.class: nginx | |
spec: | |
rules: | |
- http: |
View webapp-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: web | |
namespace: mywebapp | |
labels: | |
name: web | |
app: mywebapp | |
spec: | |
selector: |
View webapp.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: web | |
namespace: mywebapp | |
labels: | |
name: web | |
app: mywebapp | |
spec: | |
replicas: 3 |
View webapp-ns.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: mywebapp |
View infrastructure.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 | |
kind: Kustomization | |
metadata: | |
name: infrastructure | |
namespace: flux-system | |
spec: | |
interval: 1m | |
sourceRef: | |
kind: GitRepository | |
name: flux-system |
View ingress-helm-release.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: helm.toolkit.fluxcd.io/v2beta1 | |
kind: HelmRelease | |
metadata: | |
name: ingress-nginx | |
namespace: ingress-system | |
spec: | |
interval: 5m | |
chart: | |
spec: | |
chart: ingress-nginx |
NewerOlder