measmonysuon commited on
Commit
996bcaa
1 Parent(s): 374f848

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -121,7 +121,7 @@ def gradio_interface(prompt, resolution_key, user_chat_id):
121
  def handle_generate_image(prompt, resolution_key, user_chat_id):
122
  points = get_user_points(user_chat_id)
123
 
124
- if points == "Guest":
125
  # If user is not found, update points_output with the registration message
126
  return None, "Please register with @myexpsupportBot"
127
 
@@ -175,7 +175,7 @@ def create_gradio_interface():
175
 
176
  # Set up interactions
177
  generate_button.click(
178
- fn=gradio_interface,
179
  inputs=[prompt_input, resolution_dropdown, user_chat_id_input],
180
  outputs=[result_output, message_output]
181
  )
 
121
  def handle_generate_image(prompt, resolution_key, user_chat_id):
122
  points = get_user_points(user_chat_id)
123
 
124
+ if points == "User not found":
125
  # If user is not found, update points_output with the registration message
126
  return None, "Please register with @myexpsupportBot"
127
 
 
175
 
176
  # Set up interactions
177
  generate_button.click(
178
+ fn=handle_generate_image,
179
  inputs=[prompt_input, resolution_dropdown, user_chat_id_input],
180
  outputs=[result_output, message_output]
181
  )