Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,9 +35,16 @@ def store_feedback(question, answer, feedback, correct_answer):
|
|
| 35 |
"correct_answer": correct_answer,
|
| 36 |
"timestamp": str(datetime.now())
|
| 37 |
}
|
| 38 |
-
print("
|
| 39 |
-
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
import re
|
|
|
|
| 35 |
"correct_answer": correct_answer,
|
| 36 |
"timestamp": str(datetime.now())
|
| 37 |
}
|
| 38 |
+
print("Attempting to store feedback:", entry)
|
| 39 |
+
|
| 40 |
+
try:
|
| 41 |
+
with open(feedback_path, "a") as f:
|
| 42 |
+
f.write(json.dumps(entry) + "\n")
|
| 43 |
+
print("✅ Feedback saved at", feedback_path)
|
| 44 |
+
except Exception as e:
|
| 45 |
+
print("❌ Error writing feedback:", e)
|
| 46 |
+
|
| 47 |
+
|
| 48 |
|
| 49 |
|
| 50 |
import re
|