Spaces:
Runtime error

Danker commited on
Commit
5275de5
·
1 Parent(s): abe5c0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -22
app.py CHANGED
@@ -78,18 +78,6 @@ def validate_youtube(url):
78
  else:
79
  return True
80
 
81
- def validate(video_url):
82
-
83
- #if validate_url(video_url):
84
- if not validators.url(video_url):
85
- if not validate_youtube(video_url):
86
- return "The URL seems not for Youtube videos or the video is too long. Check out the errors in the log. "
87
- else:
88
- download_video(video_url)
89
- else:
90
- return "Invalid URL. Please check the format of your link. "
91
-
92
-
93
  def validate_url(url):
94
  if not validators.url(url):
95
  return True
@@ -117,18 +105,8 @@ def transcribe(video_url):
117
 
118
  text = ""
119
 
120
- '''
121
- validate(video_url)
122
- if not validate_youtube(video_url):
123
- return "The URL seems not for Youtube videos or the video is too long. Check out the errors in the log. "
124
- else:
125
- download_video(video_url)
126
- '''
127
 
128
  if validate_url(video_url):
129
- #if not validators.url(video_url):
130
- #if video_url[0:8] == "https://" or video_url[0:8] == "http://":
131
- # video_url = video_url[8::]
132
 
133
  if not validate_youtube(video_url):
134
  return "Not a YouTube video"
 
78
  else:
79
  return True
80
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  def validate_url(url):
82
  if not validators.url(url):
83
  return True
 
105
 
106
  text = ""
107
 
 
 
 
 
 
 
 
108
 
109
  if validate_url(video_url):
 
 
 
110
 
111
  if not validate_youtube(video_url):
112
  return "Not a YouTube video"