Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,12 +46,12 @@ with gr.Blocks(theme=gr.themes.Base(), css="body { background-color: #0f0f0f; co
|
|
46 |
# Update conversation history safely (avoids FutureWarning)
|
47 |
new_row = [q, opt1, opt2, result["answer"], result["confidence"], result["reasoning"], result["context_used"]]
|
48 |
new_row_df = pd.DataFrame([new_row], columns=hist.columns)
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
|
56 |
|
57 |
|
|
|
46 |
# Update conversation history safely (avoids FutureWarning)
|
47 |
new_row = [q, opt1, opt2, result["answer"], result["confidence"], result["reasoning"], result["context_used"]]
|
48 |
new_row_df = pd.DataFrame([new_row], columns=hist.columns)
|
49 |
+
if hist.empty:
|
50 |
+
updated_df = new_row_df
|
51 |
+
else:
|
52 |
+
updated_df = pd.concat([hist, new_row_df], ignore_index=True)
|
53 |
+
|
54 |
+
return evo_text, gpt_text, stats_text, updated_df
|
55 |
|
56 |
|
57 |
|