lalaru commited on
Commit
7ec2750
·
verified ·
1 Parent(s): 26c5803

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -66,13 +66,16 @@ def analyze_text(user_input):
66
  )
67
 
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)
 
66
  )
67
 
68
  corrected_text = response.choices[0].message.content # ✅ fixed
69
+ # corrected_text = response.choices[0].message.content
70
+
71
 
72
  if "✅ Correct" in response or "No errors" in response:
73
  update_daily_stats(is_correct=True)
74
  else:
75
  update_daily_stats(is_correct=False)
76
 
77
+ return corrected_text # not return response
78
+
79
  # Save history
80
  with open(HISTORY_FILE, "r+") as f:
81
  history = json.load(f)