Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -321,7 +321,8 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 321 |
triggers=[generate_button.click, prompt_input.submit],
|
| 322 |
fn=unified_image_generator,
|
| 323 |
inputs=[prompt_input, image_input_gallery, previous_video_state, last_frame_of_video_state, manual_token],
|
| 324 |
-
outputs=[output_image, create_video_button, extend_video_button, video_group]
|
|
|
|
| 325 |
)
|
| 326 |
use_image_button.click(
|
| 327 |
fn=lambda img: (
|
|
@@ -329,21 +330,26 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 329 |
gr.update(visible=False), gr.update(visible=False)
|
| 330 |
),
|
| 331 |
inputs=[output_image],
|
| 332 |
-
outputs=[image_input_gallery, output_image, create_video_button, extend_video_button, video_group]
|
|
|
|
| 333 |
)
|
| 334 |
create_video_button.click(
|
| 335 |
-
fn=lambda: gr.update(visible=True), outputs=[video_group]
|
|
|
|
| 336 |
).then(
|
| 337 |
fn=create_new_video,
|
| 338 |
inputs=[image_input_gallery, prompt_input, output_image],
|
| 339 |
outputs=[video_output, previous_video_state, last_frame_of_video_state],
|
|
|
|
| 340 |
)
|
| 341 |
extend_video_button.click(
|
| 342 |
-
fn=lambda: gr.update(visible=True), outputs=[video_group]
|
|
|
|
| 343 |
).then(
|
| 344 |
fn=extend_existing_video,
|
| 345 |
inputs=[image_input_gallery, prompt_input, output_image, previous_video_state],
|
| 346 |
outputs=[video_output, previous_video_state, last_frame_of_video_state],
|
|
|
|
| 347 |
)
|
| 348 |
|
| 349 |
def control_access(profile: Optional[gr.OAuthProfile] = None, oauth_token: Optional[gr.OAuthToken] = None):
|
|
@@ -361,4 +367,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=css) as demo:
|
|
| 361 |
demo.load(control_access, inputs=None, outputs=[main_interface, pro_message])
|
| 362 |
|
| 363 |
if __name__ == "__main__":
|
| 364 |
-
demo.queue(max_size=None, default_concurrency_limit=None).launch(show_error=True)
|
|
|
|
| 321 |
triggers=[generate_button.click, prompt_input.submit],
|
| 322 |
fn=unified_image_generator,
|
| 323 |
inputs=[prompt_input, image_input_gallery, previous_video_state, last_frame_of_video_state, manual_token],
|
| 324 |
+
outputs=[output_image, create_video_button, extend_video_button, video_group],
|
| 325 |
+
api_name=False
|
| 326 |
)
|
| 327 |
use_image_button.click(
|
| 328 |
fn=lambda img: (
|
|
|
|
| 330 |
gr.update(visible=False), gr.update(visible=False)
|
| 331 |
),
|
| 332 |
inputs=[output_image],
|
| 333 |
+
outputs=[image_input_gallery, output_image, create_video_button, extend_video_button, video_group],
|
| 334 |
+
api_name=False
|
| 335 |
)
|
| 336 |
create_video_button.click(
|
| 337 |
+
fn=lambda: gr.update(visible=True), outputs=[video_group],
|
| 338 |
+
api_name=False
|
| 339 |
).then(
|
| 340 |
fn=create_new_video,
|
| 341 |
inputs=[image_input_gallery, prompt_input, output_image],
|
| 342 |
outputs=[video_output, previous_video_state, last_frame_of_video_state],
|
| 343 |
+
api_name=False
|
| 344 |
)
|
| 345 |
extend_video_button.click(
|
| 346 |
+
fn=lambda: gr.update(visible=True), outputs=[video_group],
|
| 347 |
+
api_name=False
|
| 348 |
).then(
|
| 349 |
fn=extend_existing_video,
|
| 350 |
inputs=[image_input_gallery, prompt_input, output_image, previous_video_state],
|
| 351 |
outputs=[video_output, previous_video_state, last_frame_of_video_state],
|
| 352 |
+
api_name=False
|
| 353 |
)
|
| 354 |
|
| 355 |
def control_access(profile: Optional[gr.OAuthProfile] = None, oauth_token: Optional[gr.OAuthToken] = None):
|
|
|
|
| 367 |
demo.load(control_access, inputs=None, outputs=[main_interface, pro_message])
|
| 368 |
|
| 369 |
if __name__ == "__main__":
|
| 370 |
+
demo.queue(max_size=None, default_concurrency_limit=None).launch(show_error=True, api_open=False)
|