File size: 398 Bytes
f321cec fc181fa babbf8e 68a5d49 babbf8e 68a5d49 fc181fa fa7665c 68a5d49 72ec861 7eec99c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import os
import gradio as gr
def test(txt, vid):
if txt:
return "./world.mp4"
elif vid:
return vid
# iface = gr.Interface(fn=test, inputs=["text", "video"], outputs="text", examples=["test", os.path.join(os.path.dirname(__file__), 'sample.mp4')])
iface = gr.Interface(fn=test, inputs=["text", "video"], outputs=["video"])
iface.queue(max_size=2)
iface.launch(share=True)
|