Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
def test(vid):
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
iface = gr.Interface(fn=test, inputs="video", outputs="
|
| 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)
|