Spaces:
Running
on
Zero
Running
on
Zero
debugging by zyf
Browse files
app.py
CHANGED
|
@@ -54,7 +54,7 @@ def post(
|
|
| 54 |
writer.append_data(np.array(frame))
|
| 55 |
writer.close()
|
| 56 |
print('finish')
|
| 57 |
-
return translated_text, result_video
|
| 58 |
|
| 59 |
def main():
|
| 60 |
only_first_stage = True
|
|
@@ -90,13 +90,13 @@ def main():
|
|
| 90 |
translated_text = gr.Textbox(label='Translated Text')
|
| 91 |
with gr.Tabs():
|
| 92 |
with gr.TabItem('Output1 (Video)'):
|
| 93 |
-
|
| 94 |
with gr.TabItem('Output2 (Video)'):
|
| 95 |
-
|
| 96 |
with gr.TabItem('Output3 (Video)'):
|
| 97 |
-
|
| 98 |
with gr.TabItem('Output4 (Video)'):
|
| 99 |
-
|
| 100 |
|
| 101 |
# examples = gr.Examples(
|
| 102 |
# examples=[['骑滑板的皮卡丘', False, 1234, True,None],
|
|
@@ -117,7 +117,7 @@ def main():
|
|
| 117 |
only_first_stage,
|
| 118 |
image_prompt
|
| 119 |
],
|
| 120 |
-
outputs=[translated_text,
|
| 121 |
print(gr.__version__)
|
| 122 |
|
| 123 |
demo.launch()
|
|
|
|
| 54 |
writer.append_data(np.array(frame))
|
| 55 |
writer.close()
|
| 56 |
print('finish')
|
| 57 |
+
return translated_text, result_video[0], result_video[1], result_video[2], result_video[3]
|
| 58 |
|
| 59 |
def main():
|
| 60 |
only_first_stage = True
|
|
|
|
| 90 |
translated_text = gr.Textbox(label='Translated Text')
|
| 91 |
with gr.Tabs():
|
| 92 |
with gr.TabItem('Output1 (Video)'):
|
| 93 |
+
result_video1 = gr.Video(show_label=False)
|
| 94 |
with gr.TabItem('Output2 (Video)'):
|
| 95 |
+
result_video2 = gr.Video(show_label=False)
|
| 96 |
with gr.TabItem('Output3 (Video)'):
|
| 97 |
+
result_video3 = gr.Video(show_label=False)
|
| 98 |
with gr.TabItem('Output4 (Video)'):
|
| 99 |
+
result_video4 = gr.Video(show_label=False)
|
| 100 |
|
| 101 |
# examples = gr.Examples(
|
| 102 |
# examples=[['骑滑板的皮卡丘', False, 1234, True,None],
|
|
|
|
| 117 |
only_first_stage,
|
| 118 |
image_prompt
|
| 119 |
],
|
| 120 |
+
outputs=[translated_text, result_video1, result_video2, result_video3, result_video4])
|
| 121 |
print(gr.__version__)
|
| 122 |
|
| 123 |
demo.launch()
|