prithivMLmods commited on
Commit
64ed562
·
verified ·
1 Parent(s): 4d0d888

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -10,13 +10,18 @@ def fetch(url, name, ext):
10
  os.system(f"yt-dlp {opts} {url} -o {filename}")
11
  return filename
12
 
13
- gr.Interface(
14
- fetch,
15
- [
 
16
  gr.Textbox(label="Media link", placeholder="URL goes here..."),
17
  gr.Textbox(label="File name", placeholder="best-vid"),
18
  gr.Dropdown(["mp3", "mp4"], value="mp4", label="File type")
19
  ],
20
- gr.File(label="Download!"),
21
- description="Download web media! Works on most of the yt links"
22
- ).launch()
 
 
 
 
 
10
  os.system(f"yt-dlp {opts} {url} -o {filename}")
11
  return filename
12
 
13
+ # Create the Gradio interface
14
+ interface = gr.Interface(
15
+ fn=fetch,
16
+ inputs=[
17
  gr.Textbox(label="Media link", placeholder="URL goes here..."),
18
  gr.Textbox(label="File name", placeholder="best-vid"),
19
  gr.Dropdown(["mp3", "mp4"], value="mp4", label="File type")
20
  ],
21
+ outputs=gr.File(label="Download!"),
22
+ description="Download web media! Works on most of the yt links",
23
+ theme="xiaobaiyuan/theme_brief"
24
+ )
25
+
26
+ # Launch the interface
27
+ interface.launch()