Ruslan Magana Vsevolodovna
commited on
Commit
·
27c5340
1
Parent(s):
e4b9e92
small fixes
Browse files
app.py
CHANGED
@@ -107,8 +107,8 @@ def get_transcript(url,desired_language):
|
|
107 |
except Exception:
|
108 |
print('TranscriptsDisabled:')
|
109 |
is_translated = False
|
110 |
-
return " ", is_translated
|
111 |
-
|
112 |
lista=[]
|
113 |
transcript_translation_languages=[]
|
114 |
# iterate over all available transcripts
|
@@ -231,8 +231,10 @@ def video_to_translate(url,initial_language,final_language):
|
|
231 |
videoclip = VideoFileClip(file_obj)
|
232 |
is_traduc=False
|
233 |
# Trying to get transcripts
|
|
|
234 |
text, trans, is_traduc = get_transcript(url,desired_language=lang)
|
235 |
print("Transcript Found")
|
|
|
236 |
if not is_traduc:
|
237 |
print("No Transcript Found")
|
238 |
# Trying to recognize audio
|
|
|
107 |
except Exception:
|
108 |
print('TranscriptsDisabled:')
|
109 |
is_translated = False
|
110 |
+
return " ", " ", is_translated
|
111 |
+
|
112 |
lista=[]
|
113 |
transcript_translation_languages=[]
|
114 |
# iterate over all available transcripts
|
|
|
231 |
videoclip = VideoFileClip(file_obj)
|
232 |
is_traduc=False
|
233 |
# Trying to get transcripts
|
234 |
+
|
235 |
text, trans, is_traduc = get_transcript(url,desired_language=lang)
|
236 |
print("Transcript Found")
|
237 |
+
|
238 |
if not is_traduc:
|
239 |
print("No Transcript Found")
|
240 |
# Trying to recognize audio
|