jordonpeter01 commited on
Commit
97459f7
·
verified ·
1 Parent(s): 4aef321

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import gradio as gr
2
- from gradio.inputs import InputURL
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(display_video, inputs="url", outputs="html")
 
 
 
 
 
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()