Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -68,11 +68,11 @@ def analyze_text(user_input):
|
|
| 68 |
corrected_text = response.choices[0].message.content # ✅ fixed
|
| 69 |
|
| 70 |
if "✅ Correct" in response or "No errors" in response:
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
# Save history
|
| 77 |
with open(HISTORY_FILE, "r+") as f:
|
| 78 |
history = json.load(f)
|
|
|
|
| 68 |
corrected_text = response.choices[0].message.content # ✅ fixed
|
| 69 |
|
| 70 |
if "✅ Correct" in response or "No errors" in response:
|
| 71 |
+
update_daily_stats(is_correct=True)
|
| 72 |
+
else:
|
| 73 |
+
update_daily_stats(is_correct=False)
|
| 74 |
|
| 75 |
+
return response
|
| 76 |
# Save history
|
| 77 |
with open(HISTORY_FILE, "r+") as f:
|
| 78 |
history = json.load(f)
|