jordonpeter01 commited on
Commit
29cbab8
·
verified ·
1 Parent(s): 848a109

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -2,18 +2,7 @@ import gradio as gr
2
  import webbrowser
3
 
4
  def display_video(url):
5
- html = f"""
6
- <html>
7
- <body>
8
- <video width="420" height="315" controls>
9
- <source src="{url}" type="video/mp4">
10
- </video>
11
- </body>
12
- </html>
13
- """
14
- with open("video_player.html", "w") as file:
15
- file.write(html)
16
- webbrowser.open("video_player.html")
17
 
18
  demo = gr.Interface(
19
  display_video,
@@ -25,7 +14,7 @@ demo = gr.Interface(
25
  title="Player de vídeo estilo YouTube",
26
  theme="bootstrap",
27
  layout="vertical",
28
- description="Cole a URL do vídeo e clique em 'Play' para reproduzi-lo.",
29
  )
30
 
31
  demo.launch()
 
2
  import webbrowser
3
 
4
  def display_video(url):
5
+ webbrowser.open("index.html")
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  demo = gr.Interface(
8
  display_video,
 
14
  title="Player de vídeo estilo YouTube",
15
  theme="bootstrap",
16
  layout="vertical",
17
+ description="Cole a URL do vídeo e clique em 'Reproduzir' para reproduzi-lo.",
18
  )
19
 
20
  demo.launch()