yufengzhu commited on
Commit
b1a2d4d
·
1 Parent(s): 525fad7
Files changed (1) hide show
  1. app.py +4 -9
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[0], result_video[1], result_video[2], result_video[3]
58
 
59
  def main():
60
  only_first_stage = True
@@ -90,13 +90,8 @@ def main():
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,7 +112,7 @@ def main():
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()
 
54
  writer.append_data(np.array(frame))
55
  writer.close()
56
  print('finish')
57
+ return translated_text, result_video[0]
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_video = gr.Video(show_label=False)
94
+
 
 
 
 
 
95
 
96
  # examples = gr.Examples(
97
  # examples=[['骑滑板的皮卡丘', False, 1234, True,None],
 
112
  only_first_stage,
113
  image_prompt
114
  ],
115
+ outputs=[translated_text, result_video])
116
  print(gr.__version__)
117
 
118
  demo.launch()