Spaces:
Runtime error
Runtime error
app
Browse files
app.py
CHANGED
|
@@ -367,8 +367,14 @@ quick_prompts = [[x] for x in quick_prompts]
|
|
| 367 |
# }
|
| 368 |
# """
|
| 369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
# Gradio UI 结构
|
| 371 |
-
block = gr.Blocks().queue()
|
| 372 |
with block:
|
| 373 |
with gr.Row():
|
| 374 |
# gr.Markdown("## RelightVid (Relighting with Foreground and Background Video Condition)")
|
|
@@ -410,15 +416,25 @@ with block:
|
|
| 410 |
# normal_button = gr.Button(value="Compute Normal (4x Slower)")
|
| 411 |
|
| 412 |
with gr.Column():
|
| 413 |
-
result_video = gr.Video(label='Output Video', height=
|
| 414 |
|
| 415 |
-
prompt = gr.Textbox(label="Prompt")
|
| 416 |
bg_source = gr.Radio(choices=[e.value for e in BGSource],
|
| 417 |
value=BGSource.UPLOAD.value,
|
| 418 |
-
label="Background Source",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
|
| 420 |
-
example_prompts = gr.Dataset(samples=quick_prompts, label='Prompt Quick List', components=[prompt])
|
| 421 |
-
relight_button = gr.Button(value="Relight")
|
| 422 |
# fg_gallery = gr.Gallery(witdth=400, object_fit='contain', label='Foreground Quick List', value=db_examples.bg_samples, columns=4, allow_preview=False)
|
| 423 |
# fg_gallery = gr.Gallery(
|
| 424 |
# height=380,
|
|
|
|
| 367 |
# }
|
| 368 |
# """
|
| 369 |
|
| 370 |
+
css = """
|
| 371 |
+
#prompt-box, #bg-source, #quick-list, #relight-btn {
|
| 372 |
+
width: 750px !important;
|
| 373 |
+
}
|
| 374 |
+
"""
|
| 375 |
+
|
| 376 |
# Gradio UI 结构
|
| 377 |
+
block = gr.Blocks(css=css).queue()
|
| 378 |
with block:
|
| 379 |
with gr.Row():
|
| 380 |
# gr.Markdown("## RelightVid (Relighting with Foreground and Background Video Condition)")
|
|
|
|
| 416 |
# normal_button = gr.Button(value="Compute Normal (4x Slower)")
|
| 417 |
|
| 418 |
with gr.Column():
|
| 419 |
+
result_video = gr.Video(label='Output Video', height=750, width=750, visible=True)
|
| 420 |
|
| 421 |
+
prompt = gr.Textbox(label="Prompt", elem_id="prompt-box")
|
| 422 |
bg_source = gr.Radio(choices=[e.value for e in BGSource],
|
| 423 |
value=BGSource.UPLOAD.value,
|
| 424 |
+
label="Background Source",
|
| 425 |
+
type='value',
|
| 426 |
+
elem_id="bg-source")
|
| 427 |
+
|
| 428 |
+
example_prompts = gr.Dataset(samples=quick_prompts, label='Prompt Quick List', components=[prompt], elem_id="quick-list")
|
| 429 |
+
relight_button = gr.Button(value="Relight", elem_id="relight-btn")
|
| 430 |
+
|
| 431 |
+
# prompt = gr.Textbox(label="Prompt")
|
| 432 |
+
# bg_source = gr.Radio(choices=[e.value for e in BGSource],
|
| 433 |
+
# value=BGSource.UPLOAD.value,
|
| 434 |
+
# label="Background Source", type='value')
|
| 435 |
|
| 436 |
+
# example_prompts = gr.Dataset(samples=quick_prompts, label='Prompt Quick List', components=[prompt])
|
| 437 |
+
# relight_button = gr.Button(value="Relight")
|
| 438 |
# fg_gallery = gr.Gallery(witdth=400, object_fit='contain', label='Foreground Quick List', value=db_examples.bg_samples, columns=4, allow_preview=False)
|
| 439 |
# fg_gallery = gr.Gallery(
|
| 440 |
# height=380,
|