manasagangotri commited on
Commit
d483f79
·
verified ·
1 Parent(s): b324bf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
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("Storing feedback:", entry)
39
- with open(feedback_path, "a") as f:
40
- f.write(json.dumps(entry) + "\n")
 
 
 
 
 
 
 
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