Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,8 +32,8 @@ def openai_chat(prompt):
|
|
| 32 |
|
| 33 |
#Get Data
|
| 34 |
#df = pd.read_csv('https://cdn.openai.com/API/examples/data/olympics_sections_text.csv')
|
| 35 |
-
df = pd.read_csv('olympics_sections_text.csv')
|
| 36 |
-
|
| 37 |
#df = pd.read_csv('Radiation.csv')
|
| 38 |
df = df.set_index(["title", "heading"])
|
| 39 |
|
|
@@ -89,8 +89,8 @@ def load_embeddings(fname: str) -> dict[tuple[str, str], list[float]]:
|
|
| 89 |
#document_embeddings = load_embeddings("https://cdn.openai.com/API/examples/data/olympics_sections_document_embeddings.csv")
|
| 90 |
#data_files = {"RadiationWikiEmbedding.csv"}dataset = load_dataset("mcbrs1/RadiationWiki", data_files=data_files)
|
| 91 |
#document_embeddings = load_embeddings("olympics_Radiation.csv")
|
| 92 |
-
|
| 93 |
-
document_embeddings = load_embeddings("olympics_sections_document_embeddings.csv")
|
| 94 |
#document_embeddings = dtR
|
| 95 |
|
| 96 |
def vector_similarity(x: list[float], y: list[float]) -> float:
|
|
|
|
| 32 |
|
| 33 |
#Get Data
|
| 34 |
#df = pd.read_csv('https://cdn.openai.com/API/examples/data/olympics_sections_text.csv')
|
| 35 |
+
#df = pd.read_csv('olympics_sections_text.csv')
|
| 36 |
+
df = pd.read_csv('olympics_Radiation.csv')
|
| 37 |
#df = pd.read_csv('Radiation.csv')
|
| 38 |
df = df.set_index(["title", "heading"])
|
| 39 |
|
|
|
|
| 89 |
#document_embeddings = load_embeddings("https://cdn.openai.com/API/examples/data/olympics_sections_document_embeddings.csv")
|
| 90 |
#data_files = {"RadiationWikiEmbedding.csv"}dataset = load_dataset("mcbrs1/RadiationWiki", data_files=data_files)
|
| 91 |
#document_embeddings = load_embeddings("olympics_Radiation.csv")
|
| 92 |
+
document_embeddings = load_embeddings("RadiationWikiEmbedding.csv")
|
| 93 |
+
#document_embeddings = load_embeddings("olympics_sections_document_embeddings.csv")
|
| 94 |
#document_embeddings = dtR
|
| 95 |
|
| 96 |
def vector_similarity(x: list[float], y: list[float]) -> float:
|