measmonysuon commited on
Commit
564c587
1 Parent(s): 42b7f57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -177,17 +177,10 @@ def create_gradio_interface(user_chat_id):
177
  outputs=[result_output, message_output]
178
  )
179
 
180
- # Set up interactions for the points retrieval
181
  get_points_button.click(
182
- fn=lambda: (
183
- url := 'https://measmonysuon-imagen.hf.space/?user_chat_id=00000000',
184
- user_chat_id := extract_user_chat_id_from_url(url),
185
- points := retrieve_user_points(user_chat_id)[1], # Retrieve points based on extracted user_chat_id
186
- (user_chat_id, points)
187
- ),
188
- inputs=[], # No inputs for this lambda function as it uses the value directly
189
- outputs=[user_chat_id_input, points_output] # Update both outputs
190
- )
191
 
192
  gr.HTML("""
193
  <style>
 
177
  outputs=[result_output, message_output]
178
  )
179
 
 
180
  get_points_button.click(
181
+ fn=retrieve_user_points,
182
+ inputs=[user_chat_id_input],
183
+ outputs=[points_output, user_chat_id_input] # Update both outputs
 
 
 
 
 
 
184
 
185
  gr.HTML("""
186
  <style>