measmonysuon commited on
Commit
3816242
1 Parent(s): 487dff6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -24
app.py CHANGED
@@ -181,36 +181,26 @@ def create_gradio_interface():
181
  with gr.Blocks() as interface:
182
  gr.HTML("""
183
  <h1>AI Image Generation DALL·E 4K</h1>
184
- <h3>Welcome! Please enter your user chat ID to continue.</h3>
185
  """)
186
 
187
- user_chat_id_input = gr.Textbox(label="Your UID", placeholder="Your UID")
188
- user_otp_input = gr.Textbox(label="OTP", type="password")
189
-
 
190
  with gr.Row():
191
  request_otp_button = gr.Button("Request OTP")
192
- user_otp_input
193
-
194
- points_output = gr.Textbox(label="Your Balances", placeholder="Your Points", interactive=False)
 
 
 
 
195
 
196
- get_points_button = gr.Button("Show Your Points")
197
- prompt_input = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
198
- resolution_dropdown = gr.Dropdown(choices=list(resolutions.keys()), label="Resolution", value="1024x1024")
199
  generate_button = gr.Button("Generate")
200
-
201
  result_output = gr.Image(label="Generated Image", type="pil")
202
- message_output = gr.Textbox(label="Result", placeholder="Results will be shown here", interactive=False)
203
-
204
- with gr.Row():
205
- user_chat_id_input
206
- points_output
207
- request_otp_button
208
- get_points_button
209
-
210
- with gr.Row():
211
- prompt_input
212
- resolution_dropdown
213
- generate_button
214
 
215
  generate_button.click(
216
  fn=handle_generate_image,
@@ -221,7 +211,7 @@ def create_gradio_interface():
221
  get_points_button.click(
222
  fn=retrieve_user_points,
223
  inputs=[user_chat_id_input, user_otp_input],
224
- outputs=[points_output]
225
  )
226
 
227
  request_otp_button.click(
 
181
  with gr.Blocks() as interface:
182
  gr.HTML("""
183
  <h1>AI Image Generation DALL·E 4K</h1>
184
+ <h3>Welcome! Please enter your user chat ID and OTP to continue.</h3>
185
  """)
186
 
187
+ with gr.Row():
188
+ user_chat_id_input = gr.Textbox(label="Your UID", placeholder="Enter your UID")
189
+ user_otp_input = gr.Textbox(label="OTP", type="password", placeholder="Enter your OTP")
190
+
191
  with gr.Row():
192
  request_otp_button = gr.Button("Request OTP")
193
+ get_points_button = gr.Button("Show Your Points")
194
+
195
+ points_output = gr.Textbox(label="Your Balance", placeholder="Your Points", interactive=False)
196
+
197
+ with gr.Row():
198
+ prompt_input = gr.Textbox(label="Prompt", placeholder="Enter your prompt here...")
199
+ resolution_dropdown = gr.Dropdown(choices=list(resolutions.keys()), label="Resolution", value="1024x1024")
200
 
 
 
 
201
  generate_button = gr.Button("Generate")
 
202
  result_output = gr.Image(label="Generated Image", type="pil")
203
+ message_output = gr.Textbox(label="Message", placeholder="Results and notifications will be shown here", interactive=False)
 
 
 
 
 
 
 
 
 
 
 
204
 
205
  generate_button.click(
206
  fn=handle_generate_image,
 
211
  get_points_button.click(
212
  fn=retrieve_user_points,
213
  inputs=[user_chat_id_input, user_otp_input],
214
+ outputs=[points_output, message_output]
215
  )
216
 
217
  request_otp_button.click(