Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -439,7 +439,7 @@ def ask_df(df, api_key, model, ui_session_id):
|
|
439 |
question = row.iloc[-1]
|
440 |
print(f"Question: {question}")
|
441 |
if len(question)<2:
|
442 |
-
question = df.at[
|
443 |
db_folder = "/".join([session_folder, row["File name"]])
|
444 |
db = FAISS.load_local(db_folder,embeddings)
|
445 |
docs = db.similarity_search(question)
|
|
|
439 |
question = row.iloc[-1]
|
440 |
print(f"Question: {question}")
|
441 |
if len(question)<2:
|
442 |
+
question = df.at[0, question_column].split("\n---\n")[0]
|
443 |
db_folder = "/".join([session_folder, row["File name"]])
|
444 |
db = FAISS.load_local(db_folder,embeddings)
|
445 |
docs = db.similarity_search(question)
|