jordonpeter01 commited on
Commit
4aef321
·
verified ·
1 Parent(s): 8ebd664

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -1,6 +1,5 @@
1
- # This code is in the same repo as the web page
2
  import gradio as gr
3
- from gradio.inputs import URL
4
  from gradio.outputs import HTML
5
 
6
  def display_video(url):
@@ -8,13 +7,7 @@ def display_video(url):
8
  <video width="420" height="315" controls>
9
  <source src="{url}" type="video/mp4">
10
  </video>
11
- {url}
12
  """
13
 
14
- demo = gr.Interface(
15
- display_video,
16
- ["url"],
17
- HTML(type="youtube"),
18
- )
19
-
20
  demo.launch()
 
 
1
  import gradio as gr
2
+ from gradio.inputs import InputURL
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
  """
11
 
12
+ demo = gr.Interface(display_video, inputs="url", outputs="html")
 
 
 
 
 
13
  demo.launch()