measmonysuon commited on
Commit
d877af8
1 Parent(s): b474158

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,7 @@ def retrieve_user_points(user_chat_id, otp):
89
  if response.status_code == 200:
90
  data = response.json()
91
  points = data.get("points", 0)
92
- return points, "OTP verification success"
93
  return "Error retrieving points. Please try again later."
94
 
95
  def update_user_points(user_chat_id, points):
@@ -224,7 +224,7 @@ def create_gradio_interface():
224
  get_points_button.click(
225
  fn=retrieve_user_points,
226
  inputs=[user_chat_id_input, user_otp_input],
227
- outputs=[points_output]
228
  )
229
 
230
  request_otp_button.click(
 
89
  if response.status_code == 200:
90
  data = response.json()
91
  points = data.get("points", 0)
92
+ return points
93
  return "Error retrieving points. Please try again later."
94
 
95
  def update_user_points(user_chat_id, points):
 
224
  get_points_button.click(
225
  fn=retrieve_user_points,
226
  inputs=[user_chat_id_input, user_otp_input],
227
+ outputs=[points_output, message_output]
228
  )
229
 
230
  request_otp_button.click(