jordonpeter01 commited on
Commit
873df1b
·
verified ·
1 Parent(s): c1c005a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -4
app.py CHANGED
@@ -2,16 +2,24 @@ import gradio as gr
2
 
3
  def display_video(url):
4
  return f"""
5
- <video width="420" height="315" controls>
6
- <source src="{url}" type="video/mp4">
7
- </video>
8
- {url}
 
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()