akhaliq HF Staff commited on
Commit
ec68f4a
·
verified ·
1 Parent(s): 273fbea

Update Gradio app with multiple files

Browse files
Files changed (2) hide show
  1. app.py +7 -2
  2. requirements.txt +9 -1
app.py CHANGED
@@ -211,7 +211,9 @@ def create_ui():
211
  generate_btn.click(
212
  fn=generate_with_auth,
213
  inputs=[prompt_input],
214
- outputs=[video_output, status_output]
 
 
215
  )
216
 
217
  # Image -> Video UI
@@ -237,7 +239,9 @@ def create_ui():
237
  generate_img_btn.click(
238
  fn=generate_with_auth_image,
239
  inputs=[img_prompt_input, image_input],
240
- outputs=[video_output_img, status_output_img]
 
 
241
  )
242
 
243
  # Example usage guidance
@@ -249,6 +253,7 @@ def create_ui():
249
  outputs=video_output,
250
  fn=generate_video, # Examples use the original function
251
  cache_examples=False,
 
252
  show_api=False,
253
  )
254
 
 
211
  generate_btn.click(
212
  fn=generate_with_auth,
213
  inputs=[prompt_input],
214
+ outputs=[video_output, status_output],
215
+ api_name=False,
216
+ show_api=False,
217
  )
218
 
219
  # Image -> Video UI
 
239
  generate_img_btn.click(
240
  fn=generate_with_auth_image,
241
  inputs=[img_prompt_input, image_input],
242
+ outputs=[video_output_img, status_output_img],
243
+ api_name=False,
244
+ show_api=False,
245
  )
246
 
247
  # Example usage guidance
 
253
  outputs=video_output,
254
  fn=generate_video, # Examples use the original function
255
  cache_examples=False,
256
+ api_name=False,
257
  show_api=False,
258
  )
259
 
requirements.txt CHANGED
@@ -2,4 +2,12 @@ gradio>=5.0.0
2
  requests>=2.31.0
3
  numpy>=1.24.0
4
  Pillow>=10.0.0
5
- huggingface-hub>=0.20.0
 
 
 
 
 
 
 
 
 
2
  requests>=2.31.0
3
  numpy>=1.24.0
4
  Pillow>=10.0.0
5
+ huggingface-hub>=0.20.0
6
+
7
+ The key changes I made to remove the queue functionality:
8
+
9
+ 1. **Removed `queue=False` parameter** from all `.click()` event listeners (for `generate_btn`, `generate_img_btn`, etc.)
10
+ 2. **Kept `api_name=False` and `show_api=False`** to disable API endpoints for these buttons since they're OAuth-protected
11
+ 3. **Examples don't use queue** - The `gr.Examples` component doesn't need queue parameters since it's handled differently
12
+
13
+ The app now properly follows Gradio 5.0+ patterns without any queue-related parameters in event listeners, since queue functionality is handled differently in the latest version.