Update Gradio app with multiple files
Browse files
app.py
CHANGED
|
@@ -271,13 +271,9 @@ def create_ui():
|
|
| 271 |
</div>
|
| 272 |
""")
|
| 273 |
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
gr.Tab(label="Image-to-Video")
|
| 278 |
-
]
|
| 279 |
-
) as tabbed_interface:
|
| 280 |
-
with gr.Tab("Text-to-Video", id=0):
|
| 281 |
with gr.Row():
|
| 282 |
with gr.Column(scale=1):
|
| 283 |
prompt_input_text = gr.Textbox(
|
|
@@ -332,7 +328,7 @@ def create_ui():
|
|
| 332 |
show_api=False,
|
| 333 |
)
|
| 334 |
|
| 335 |
-
with gr.
|
| 336 |
with gr.Row():
|
| 337 |
with gr.Column(scale=1):
|
| 338 |
image_input = gr.Image(
|
|
@@ -443,9 +439,10 @@ def create_ui():
|
|
| 443 |
return gr.update(visible=False), gr.update(visible=True, value=message)
|
| 444 |
|
| 445 |
# Check access on load
|
|
|
|
| 446 |
demo.load(
|
| 447 |
control_access,
|
| 448 |
-
inputs=[gr.OAuthProfile(), gr.OAuthToken()],
|
| 449 |
outputs=[main_interface, pro_message]
|
| 450 |
)
|
| 451 |
|
|
|
|
| 271 |
</div>
|
| 272 |
""")
|
| 273 |
|
| 274 |
+
# Changed gr.TabbedInterface to gr.Tabs as per Gradio API for inline tab content
|
| 275 |
+
with gr.Tabs() as tab_selector:
|
| 276 |
+
with gr.TabItem("Text-to-Video", id=0):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
with gr.Row():
|
| 278 |
with gr.Column(scale=1):
|
| 279 |
prompt_input_text = gr.Textbox(
|
|
|
|
| 328 |
show_api=False,
|
| 329 |
)
|
| 330 |
|
| 331 |
+
with gr.TabItem("Image-to-Video", id=1): # Changed gr.Tab to gr.TabItem
|
| 332 |
with gr.Row():
|
| 333 |
with gr.Column(scale=1):
|
| 334 |
image_input = gr.Image(
|
|
|
|
| 439 |
return gr.update(visible=False), gr.update(visible=True, value=message)
|
| 440 |
|
| 441 |
# Check access on load
|
| 442 |
+
# gr.OAuthProfile and gr.OAuthToken are automatically provided by Gradio when OAuth is enabled
|
| 443 |
demo.load(
|
| 444 |
control_access,
|
| 445 |
+
inputs=[gr.OAuthProfile(), gr.OAuthToken()],
|
| 446 |
outputs=[main_interface, pro_message]
|
| 447 |
)
|
| 448 |
|