Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,6 +61,8 @@ def compute_doc_embeddings(df: pd.DataFrame) -> dict[tuple[str, str], list[float
|
|
| 61 |
idx: get_embedding(r.description) for idx, r in df.iterrows()
|
| 62 |
}
|
| 63 |
|
|
|
|
|
|
|
| 64 |
def construct_prompt(question: str, context_embeddings: dict, df: pd.DataFrame) -> str:
|
| 65 |
"""
|
| 66 |
Fetch relevant
|
|
|
|
| 61 |
idx: get_embedding(r.description) for idx, r in df.iterrows()
|
| 62 |
}
|
| 63 |
|
| 64 |
+
document_embeddings = compute_doc_embeddings(df)
|
| 65 |
+
|
| 66 |
def construct_prompt(question: str, context_embeddings: dict, df: pd.DataFrame) -> str:
|
| 67 |
"""
|
| 68 |
Fetch relevant
|