akhaliq HF Staff commited on
Commit
dc8694f
·
verified ·
1 Parent(s): f5118b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -185,9 +185,7 @@ def create_ui():
185
  fn=generate_with_auth,
186
  inputs=[prompt_input],
187
  outputs=[video_output, status_output],
188
- show_progress="full",
189
- api_name=False,
190
- show_api=False
191
  )
192
 
193
  # Image -> Video UI
@@ -214,9 +212,6 @@ def create_ui():
214
  fn=generate_with_auth_image,
215
  inputs=[img_prompt_input, image_input],
216
  outputs=[video_output_img, status_output_img],
217
- show_progress="full",
218
- api_name=False,
219
- show_api=False
220
  )
221
 
222
  # Example usage guidance
@@ -226,7 +221,7 @@ def create_ui():
226
  ],
227
  inputs=prompt_input,
228
  outputs=video_output,
229
- fn=generate_video,
230
  cache_examples=False,
231
  api_name=False,
232
  show_api=False,
@@ -243,6 +238,12 @@ if __name__ == "__main__":
243
  print(f"Initial cleanup error: {e}")
244
 
245
  app = create_ui()
 
 
 
 
 
 
246
  app.launch(
247
  show_api=False,
248
  enable_monitoring=False,
 
185
  fn=generate_with_auth,
186
  inputs=[prompt_input],
187
  outputs=[video_output, status_output],
188
+ # Queue will be automatically enabled with OAuth
 
 
189
  )
190
 
191
  # Image -> Video UI
 
212
  fn=generate_with_auth_image,
213
  inputs=[img_prompt_input, image_input],
214
  outputs=[video_output_img, status_output_img],
 
 
 
215
  )
216
 
217
  # Example usage guidance
 
221
  ],
222
  inputs=prompt_input,
223
  outputs=video_output,
224
+ fn=generate_video, # Examples use the original function
225
  cache_examples=False,
226
  api_name=False,
227
  show_api=False,
 
238
  print(f"Initial cleanup error: {e}")
239
 
240
  app = create_ui()
241
+ # Configure queue with optimized settings for OAuth-enabled app
242
+ app.queue(
243
+ status_update_rate="auto",
244
+ api_open=False, # Disable public API access for security
245
+ default_concurrency_limit=None # Allow multiple concurrent requests
246
+ )
247
  app.launch(
248
  show_api=False,
249
  enable_monitoring=False,