ginipick commited on
Commit
5159f05
ยท
verified ยท
1 Parent(s): 1d76089

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -14
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("์„œ๋ฒ„ ์—ฐ๊ฒฐ ํ…Œ์ŠคํŠธ").click(
91
- test_api_connection,
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").click(
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", elem_id="animation_out")
109
- gr.Video(label="Side-by-side", elem_id="comp_out")
110
-
111
  with gr.Accordion("๋กœ๊ทธ", open=False):
112
- gr.Textbox(label="์‹คํ–‰ ๋กœ๊ทธ", lines=12, max_lines=20, interactive=False, elem_id="log_out")
 
 
 
 
 
 
 
113
 
114
  if __name__ == "__main__":
115
- demo.queue(max_size=4).launch(server_name="0.0.0.0", server_port=7860, show_api=False)
 
 
 
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)