Spaces:
Runtime error
Runtime error
measmonysuon
commited on
Commit
•
922fe06
1
Parent(s):
64cbbc6
Update app.py
Browse files
app.py
CHANGED
@@ -150,7 +150,7 @@ def gradio_interface(prompt, resolution_key, user_chat_id):
|
|
150 |
'''
|
151 |
def gradio_interface(prompt, resolution_key, user_chat_id):
|
152 |
if not user_chat_id.strip():
|
153 |
-
return None, "User Chat ID cannot be blank. Please provide a valid User Chat ID."
|
154 |
|
155 |
result = generate_image(prompt, resolution_key)
|
156 |
if result and result[0]:
|
@@ -187,6 +187,10 @@ def handle_generate_image(prompt, resolution_key, user_chat_id):
|
|
187 |
return None, "Insufficient points. Please get more points before generating an image."
|
188 |
|
189 |
def request_otp_and_update_ui(user_chat_id):
|
|
|
|
|
|
|
|
|
190 |
otp_response = request_otp(user_chat_id)
|
191 |
if otp_response.get("success"):
|
192 |
return "OTP has been sent to your registered contact."
|
|
|
150 |
'''
|
151 |
def gradio_interface(prompt, resolution_key, user_chat_id):
|
152 |
if not user_chat_id.strip():
|
153 |
+
return None, "User Chat ID cannot be blank. Please provide a valid User Chat ID or register with @supportBot to get UID."
|
154 |
|
155 |
result = generate_image(prompt, resolution_key)
|
156 |
if result and result[0]:
|
|
|
187 |
return None, "Insufficient points. Please get more points before generating an image."
|
188 |
|
189 |
def request_otp_and_update_ui(user_chat_id):
|
190 |
+
# Validate user_chat_id
|
191 |
+
if not user_chat_id.strip():
|
192 |
+
return "User Chat ID cannot be blank. Please provide a valid User Chat ID or register with @supportBot to get UID."
|
193 |
+
|
194 |
otp_response = request_otp(user_chat_id)
|
195 |
if otp_response.get("success"):
|
196 |
return "OTP has been sent to your registered contact."
|