Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,16 +2,24 @@ import gradio as gr
|
|
| 2 |
|
| 3 |
def display_video(url):
|
| 4 |
return f"""
|
| 5 |
-
<
|
| 6 |
-
<
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
"""
|
| 10 |
|
| 11 |
demo = gr.Interface(
|
| 12 |
display_video,
|
| 13 |
gr.inputs.Textbox(label="URL do vídeo"),
|
| 14 |
gr.outputs.HTML(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
)
|
| 16 |
|
| 17 |
demo.launch()
|
|
|
|
| 2 |
|
| 3 |
def display_video(url):
|
| 4 |
return f"""
|
| 5 |
+
<div class="embed-responsive embed-responsive-16by9">
|
| 6 |
+
<video class="embed-responsive-item" controls>
|
| 7 |
+
<source src="{url}" type="video/mp4">
|
| 8 |
+
</video>
|
| 9 |
+
</div>
|
| 10 |
"""
|
| 11 |
|
| 12 |
demo = gr.Interface(
|
| 13 |
display_video,
|
| 14 |
gr.inputs.Textbox(label="URL do vídeo"),
|
| 15 |
gr.outputs.HTML(),
|
| 16 |
+
examples=[
|
| 17 |
+
["https://www.example.com/video.mp4"]
|
| 18 |
+
],
|
| 19 |
+
title="Player de vídeo estilo YouTube",
|
| 20 |
+
theme="bootstrap",
|
| 21 |
+
layout="vertical",
|
| 22 |
+
description="Cole a URL do vídeo e clique em 'Play' para reproduzi-lo.",
|
| 23 |
)
|
| 24 |
|
| 25 |
demo.launch()
|