Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,10 +87,8 @@ with gr.Blocks(title="Animation Generator Client") as demo:
|
|
| 87 |
|
| 88 |
# health check
|
| 89 |
status_box = gr.Textbox(label="API ์ํ", interactive=False)
|
| 90 |
-
gr.Button("์๋ฒ ์ฐ๊ฒฐ ํ
์คํธ")
|
| 91 |
-
|
| 92 |
-
outputs=[status_box, status_box]
|
| 93 |
-
)
|
| 94 |
|
| 95 |
gr.Markdown("---")
|
| 96 |
with gr.Row():
|
|
@@ -99,17 +97,21 @@ with gr.Blocks(title="Animation Generator Client") as demo:
|
|
| 99 |
aud_in = gr.Audio(type="filepath", label="Audio")
|
| 100 |
scale = gr.Slider(1, 10, value=3.0, step=0.1, label="Guidance Scale")
|
| 101 |
steps = gr.Slider(5, 30, value=10, step=1, label="Inference Steps")
|
| 102 |
-
gr.Button("๐ Generate")
|
| 103 |
-
generate_animation,
|
| 104 |
-
inputs=[img_in, aud_in, scale, steps],
|
| 105 |
-
outputs=["animation_out", "comp_out", "log_out"]
|
| 106 |
-
)
|
| 107 |
with gr.Column():
|
| 108 |
-
gr.Video(label="Animation Result"
|
| 109 |
-
gr.Video(label="Side-by-side"
|
| 110 |
-
|
| 111 |
with gr.Accordion("๋ก๊ทธ", open=False):
|
| 112 |
-
gr.Textbox(label="์คํ ๋ก๊ทธ", lines=12, max_lines=20, interactive=False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
if __name__ == "__main__":
|
| 115 |
-
demo.queue(max_size=4).launch(server_name="0.0.0.0",
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
# health check
|
| 89 |
status_box = gr.Textbox(label="API ์ํ", interactive=False)
|
| 90 |
+
test_btn = gr.Button("์๋ฒ ์ฐ๊ฒฐ ํ
์คํธ")
|
| 91 |
+
test_btn.click(test_api_connection, outputs=[status_box, status_box])
|
|
|
|
|
|
|
| 92 |
|
| 93 |
gr.Markdown("---")
|
| 94 |
with gr.Row():
|
|
|
|
| 97 |
aud_in = gr.Audio(type="filepath", label="Audio")
|
| 98 |
scale = gr.Slider(1, 10, value=3.0, step=0.1, label="Guidance Scale")
|
| 99 |
steps = gr.Slider(5, 30, value=10, step=1, label="Inference Steps")
|
| 100 |
+
gen_btn = gr.Button("๐ Generate") # ๋ฒํผ์ ๋ณ์๋ก
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
with gr.Column():
|
| 102 |
+
anim_out = gr.Video(label="Animation Result")
|
| 103 |
+
comp_out = gr.Video(label="Side-by-side")
|
|
|
|
| 104 |
with gr.Accordion("๋ก๊ทธ", open=False):
|
| 105 |
+
log_out = gr.Textbox(label="์คํ ๋ก๊ทธ", lines=12, max_lines=20, interactive=False)
|
| 106 |
+
|
| 107 |
+
# โญ click ์ฐ๊ฒฐ ยญโ outputs์ **์ปดํฌ๋ํธ ๋ณ์** ์ฌ์ฉ
|
| 108 |
+
gen_btn.click(
|
| 109 |
+
generate_animation,
|
| 110 |
+
inputs=[img_in, aud_in, scale, steps],
|
| 111 |
+
outputs=[anim_out, comp_out, log_out] # โ ๋ฌธ์์ด X
|
| 112 |
+
)
|
| 113 |
|
| 114 |
if __name__ == "__main__":
|
| 115 |
+
demo.queue(max_size=4).launch(server_name="0.0.0.0",
|
| 116 |
+
server_port=7860,
|
| 117 |
+
show_api=False)
|