Spaces:
Running
Running
remove gallery for cache examples
Browse files
app.py
CHANGED
@@ -53,8 +53,6 @@ def main():
|
|
53 |
with gr.Tabs():
|
54 |
with gr.TabItem('Output (Video)'):
|
55 |
result_video = gr.Video(show_label=False)
|
56 |
-
with gr.TabItem('Output (Gallery)'):
|
57 |
-
result_gallery = gr.Gallery(show_label=False)
|
58 |
|
59 |
gr.Markdown(NOTES)
|
60 |
gr.Markdown(FOOTER)
|
@@ -64,7 +62,7 @@ def main():
|
|
64 |
["a cat playing chess",True,1253,True]],
|
65 |
fn=model.run_with_translation,
|
66 |
inputs=[text,translate,seed,only_first_stage],
|
67 |
-
outputs=[translated_text,result_video
|
68 |
cache_examples=True)
|
69 |
|
70 |
run_button.click(fn=model.run_with_translation,
|
@@ -76,8 +74,7 @@ def main():
|
|
76 |
],
|
77 |
outputs=[
|
78 |
translated_text,
|
79 |
-
result_video
|
80 |
-
result_gallery,
|
81 |
])
|
82 |
|
83 |
demo.launch()
|
|
|
53 |
with gr.Tabs():
|
54 |
with gr.TabItem('Output (Video)'):
|
55 |
result_video = gr.Video(show_label=False)
|
|
|
|
|
56 |
|
57 |
gr.Markdown(NOTES)
|
58 |
gr.Markdown(FOOTER)
|
|
|
62 |
["a cat playing chess",True,1253,True]],
|
63 |
fn=model.run_with_translation,
|
64 |
inputs=[text,translate,seed,only_first_stage],
|
65 |
+
outputs=[translated_text,result_video],
|
66 |
cache_examples=True)
|
67 |
|
68 |
run_button.click(fn=model.run_with_translation,
|
|
|
74 |
],
|
75 |
outputs=[
|
76 |
translated_text,
|
77 |
+
result_video
|
|
|
78 |
])
|
79 |
|
80 |
demo.launch()
|
model.py
CHANGED
@@ -1234,4 +1234,4 @@ class AppModel(Model):
|
|
1234 |
translated_text = None
|
1235 |
frames = self.run(text, seed, only_first_stage)
|
1236 |
video_path = self.to_video(frames)
|
1237 |
-
return translated_text, video_path
|
|
|
1234 |
translated_text = None
|
1235 |
frames = self.run(text, seed, only_first_stage)
|
1236 |
video_path = self.to_video(frames)
|
1237 |
+
return translated_text, video_path
|