freealise commited on
Commit
5a7c81b
1 Parent(s): bdb8750

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -190,7 +190,7 @@ with gr.Blocks(css=css) as demo:
190
  with gr.Column():
191
  input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
192
  input_video = gr.Video(label="Input Video")
193
- input_video.change(fn=loadurl, inputs=[input_video], outputs=[input_url])
194
  submit = gr.Button("Submit")
195
  with gr.Column():
196
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
@@ -203,12 +203,12 @@ with gr.Blocks(css=css) as demo:
203
 
204
  return output_video_path
205
 
206
- submit.click(on_submit, inputs=[input_url, model_type], outputs=processed_video)
207
 
208
  example_files = os.listdir('examples')
209
  example_files.sort()
210
  example_files = [os.path.join('examples', filename) for filename in example_files]
211
- examples = gr.Examples(examples=example_files, inputs=[input_url], outputs=processed_video, fn=on_submit, cache_examples=True)
212
 
213
 
214
  if __name__ == '__main__':
 
190
  with gr.Column():
191
  input_url = gr.Textbox(value="./examples/streetview.mp4", label="URL")
192
  input_video = gr.Video(label="Input Video")
193
+ input_url.change(fn=loadurl, inputs=[input_url], outputs=[input_video])
194
  submit = gr.Button("Submit")
195
  with gr.Column():
196
  model_type = gr.Dropdown([("small", "vits"), ("base", "vitb"), ("large", "vitl")], type="value", value="vits", label='Model Type')
 
203
 
204
  return output_video_path
205
 
206
+ submit.click(on_submit, inputs=[input_video, model_type], outputs=processed_video)
207
 
208
  example_files = os.listdir('examples')
209
  example_files.sort()
210
  example_files = [os.path.join('examples', filename) for filename in example_files]
211
+ examples = gr.Examples(examples=example_files, inputs=[input_video], outputs=processed_video, fn=on_submit, cache_examples=True)
212
 
213
 
214
  if __name__ == '__main__':