storresbusquets commited on
Commit
3dd2c60
·
1 Parent(s): ebf0b29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -165,6 +165,9 @@ class GradioInference:
165
  params:
166
  - link: a YouTube URL.
167
  """
 
 
 
168
  self.yt = YouTube(link)
169
  return self.yt.thumbnail_url, self.yt.title
170
 
@@ -376,7 +379,7 @@ with block:
376
  gr.Examples(["https://www.youtube.com/shorts/xDNzz8yAH7I","https://www.youtube.com/watch?v=kib6uXQsxBA&pp=ygURc3RldmUgam9icyBzcGVlY2g%3D"], inputs=link)
377
 
378
  gr.Markdown("### Audio Examples")
379
- gr.Examples([os.path.join(os.path.dirname(__file__),"audios/TED_ed.wav")]], inputs=audio_file)
380
 
381
  gr.Markdown("### About the app:")
382
 
 
165
  params:
166
  - link: a YouTube URL.
167
  """
168
+ if not link:
169
+ return "", "..."
170
+
171
  self.yt = YouTube(link)
172
  return self.yt.thumbnail_url, self.yt.title
173
 
 
379
  gr.Examples(["https://www.youtube.com/shorts/xDNzz8yAH7I","https://www.youtube.com/watch?v=kib6uXQsxBA&pp=ygURc3RldmUgam9icyBzcGVlY2g%3D"], inputs=link)
380
 
381
  gr.Markdown("### Audio Examples")
382
+ gr.Examples([os.path.join(os.path.dirname(__file__),"audios/TED_ed.wav")], inputs=audio_file)
383
 
384
  gr.Markdown("### About the app:")
385