Spaces:
Running on Zero
Running on Zero
remove gallery for cache examples
Browse files52 unmodified lines53545556575859603 unmodified lines646566676869705 unmodified lines767778798081828352 unmodified lineswith gr.Tabs():with gr.TabItem('Output (Video)'):result_video = gr.Video(show_label=False)with gr.TabItem('Output (Gallery)'):result_gallery = gr.Gallery(show_label=False)gr.Markdown(NOTES)gr.Markdown(FOOTER)3 unmodified lines["a cat playing chess",True,1253,True]],fn=model.run_with_translation,inputs=[text,translate,seed,only_first_stage],outputs=[translated_text,result_video,result_gallery],cache_examples=True)run_button.click(fn=model.run_with_translation,5 unmodified lines],outputs=[translated_text,result_video,result_gallery,])demo.launch()52 unmodified lines5354555657583 unmodified lines626364656667685 unmodified lines7475767778798052 unmodified lineswith gr.Tabs():with gr.TabItem('Output (Video)'):result_video = gr.Video(show_label=False)gr.Markdown(NOTES)gr.Markdown(FOOTER)3 unmodified lines["a cat playing chess",True,1253,True]],fn=model.run_with_translation,inputs=[text,translate,seed,only_first_stage],outputs=[translated_text,result_video],cache_examples=True)run_button.click(fn=model.run_with_translation,5 unmodified lines],outputs=[translated_text,result_video])demo.launch()
1233 unmodified lines12341235123612371233 unmodified linestranslated_text = Noneframes = self.run(text, seed, only_first_stage)video_path = self.to_video(frames)return translated_text, video_path, frames1233 unmodified lines12341235123612371233 unmodified linestranslated_text = Noneframes = self.run(text, seed, only_first_stage)video_path = self.to_video(frames)return translated_text, video_path
app.py+2-5
model.py+1-1