yufengzhu commited on
Commit
525fad7
·
1 Parent(s): 17f0cb5

debugging by zyf

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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
- result_video[0] = gr.Video(show_label=False)
94
  with gr.TabItem('Output2 (Video)'):
95
- result_video[1] = gr.Video(show_label=False)
96
  with gr.TabItem('Output3 (Video)'):
97
- result_video[2] = gr.Video(show_label=False)
98
  with gr.TabItem('Output4 (Video)'):
99
- result_video[3] = gr.Video(show_label=False)
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, result_video])
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()