Lookimi commited on
Commit
532b398
·
1 Parent(s): afc6187

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+
3
+ def fetch_transcript(url, name):
4
+ os.system(f"youtube-dl --write-auto-sub --skip-download --sub-format txt {url} -o {name}.txt")
5
+ return f"{name}.txt"
6
+
7
+ import gradio as gr
8
+
9
+ gr.Interface(
10
+ fetch_transcript,
11
+ [gr.Textbox(label="YouTube Video URL", placeholder="URL goes here..."),
12
+ gr.Textbox(label="Transcript file name", placeholder="transcript")],
13
+ gr.outputs.File(label="Download Transcript"),
14
+ description="Fetch and download the transcript of a YouTube video as a human readable text file.",
15
+ enable_queue=True
16
+ ).launch()