charliebaby2023 commited on
Commit
3ffc046
1 Parent(s): 4ac237d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -2
app.py CHANGED
@@ -1,4 +1,6 @@
1
  from youtube_video import download_youtube_video
 
 
2
  import gradio as gr
3
 
4
  def app(video_link):
@@ -6,9 +8,27 @@ def app(video_link):
6
  return video_path
7
 
8
  interface = gr.Interface(
 
9
  fn=app,
10
- inputs=gr.Textbox(label="Enter YouTube link"),
 
11
  outputs=gr.Video(label = "video_path")
12
  )
13
 
14
- interface.launch(debug=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from youtube_video import download_youtube_video
2
+ from flask import Flask, request, render_template
3
+
4
  import gradio as gr
5
 
6
  def app(video_link):
 
8
  return video_path
9
 
10
  interface = gr.Interface(
11
+ data = request.args.get('data', ''), # Extracting data from URL query parameter
12
  fn=app,
13
+ inputs=data
14
+ #gr.Textbox(label="Enter YouTube link"),
15
  outputs=gr.Video(label = "video_path")
16
  )
17
 
18
+ interface.launch(debug=True)
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+ #@app.route('/')
27
+ #def index():
28
+
29
+ # return render_template('index.html', data=data)
30
+
31
+ #if __name__ == '__main__':
32
+ # app.run(debug=True)
33
+
34
+