bstraehle commited on
Commit
9f7cbec
·
1 Parent(s): 4674bfc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -17,9 +17,10 @@ def invoke(url):
17
  YoutubeAudioLoader([url], save_dir),
18
  OpenAIWhisperParser()
19
  )
 
20
  docs = loader.load()
21
  print(len(docs))
22
- return docs[len(docs) - 1].page_content[0:500]
23
 
24
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://platform.openai.com/'>OpenAI</a> API with Whisper 1 foundation model."""
25
 
 
17
  YoutubeAudioLoader([url], save_dir),
18
  OpenAIWhisperParser()
19
  )
20
+ docs = None
21
  docs = loader.load()
22
  print(len(docs))
23
+ return docs[0].page_content
24
 
25
  description = """<a href='https://www.gradio.app/'>Gradio</a> UI using <a href='https://platform.openai.com/'>OpenAI</a> API with Whisper 1 foundation model."""
26