Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from gradio.inputs import
|
| 3 |
from gradio.outputs import HTML
|
| 4 |
|
| 5 |
def display_video(url):
|
|
@@ -7,7 +7,13 @@ def display_video(url):
|
|
| 7 |
<video width="420" height="315" controls>
|
| 8 |
<source src="{url}" type="video/mp4">
|
| 9 |
</video>
|
|
|
|
| 10 |
"""
|
| 11 |
|
| 12 |
-
demo = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from gradio.inputs import URL
|
| 3 |
from gradio.outputs import HTML
|
| 4 |
|
| 5 |
def display_video(url):
|
|
|
|
| 7 |
<video width="420" height="315" controls>
|
| 8 |
<source src="{url}" type="video/mp4">
|
| 9 |
</video>
|
| 10 |
+
{url}
|
| 11 |
"""
|
| 12 |
|
| 13 |
+
demo = gr.Interface(
|
| 14 |
+
display_video,
|
| 15 |
+
[URL()],
|
| 16 |
+
HTML(type="youtube"),
|
| 17 |
+
)
|
| 18 |
+
|
| 19 |
demo.launch()
|