BilalSardar commited on
Commit
5d80ba2
·
1 Parent(s): 61e1b36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -66,7 +66,7 @@ except:
66
 
67
  def UrlToAudio(VideoUrl):
68
  url=VideoUrl
69
- os.system("youtube-dl -x --audio-format wav " + url)
70
  # load audio and pad/trim it to fit 30 seconds
71
  base_path = Path(r"")
72
  for wav_file_path in base_path.glob("*.wav"):
@@ -249,8 +249,8 @@ radiobutton = gr.inputs.Radio(["Wordnet", "Gensim"])
249
  def generate_question(context1,radiobutton):
250
  try:
251
 
252
- #f = open("The_audio.txt", "r")
253
- context=UrlToAudio(context1)#f.read()
254
  summary_text = summarizer(context,summary_model,summary_tokenizer)
255
  for wrp in wrap(summary_text, 150):
256
  print (wrp)
 
66
 
67
  def UrlToAudio(VideoUrl):
68
  url=VideoUrl
69
+ os.system("yt-dlp -x --audio-format wav " + url)
70
  # load audio and pad/trim it to fit 30 seconds
71
  base_path = Path(r"")
72
  for wav_file_path in base_path.glob("*.wav"):
 
249
  def generate_question(context1,radiobutton):
250
  try:
251
 
252
+ f = open("The_audio.txt", "r")
253
+ context=f.read()
254
  summary_text = summarizer(context,summary_model,summary_tokenizer)
255
  for wrp in wrap(summary_text, 150):
256
  print (wrp)