gbsim commited on
Commit
babbf8e
·
verified ·
1 Parent(s): beb0deb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -1,9 +1,11 @@
1
  import os
2
  import gradio as gr
3
 
4
- def test(vid):
5
- return vid
6
-
 
 
7
 
8
- iface = gr.Interface(fn=test, inputs="video", outputs="video", examples=[os.path.join(os.path.dirname(__file__), 'sample.mp4')])
9
  iface.launch(share=True)
 
1
  import os
2
  import gradio as gr
3
 
4
+ def test(txt, vid):
5
+ if txt:
6
+ return txt
7
+ elif vid:
8
+ return "vid"
9
 
10
+ iface = gr.Interface(fn=test, inputs=["text", "video"], outputs="text", examples=[os.path.join(os.path.dirname(__file__), 'sample.mp4')])
11
  iface.launch(share=True)