flocolombari
commited on
Commit
•
d700d5f
1
Parent(s):
ad0b8ad
Update app.py
Browse files
app.py
CHANGED
@@ -50,11 +50,14 @@ def video_to_descriptions(video, target_language="en"):
|
|
50 |
|
51 |
translated_text = translator(summarized_description)[0]["translation_text"]
|
52 |
print("TRANSLATION : " + translated_text)
|
|
|
|
|
53 |
|
54 |
-
audio_file = audio(translated_text)[0]["audio"]
|
55 |
-
print("AUDIO : " + audio_file)
|
56 |
|
57 |
-
return audio_file
|
|
|
58 |
|
59 |
# Create a dropdown menu with language options
|
60 |
language_dropdown = gr.Dropdown(
|
@@ -64,7 +67,8 @@ language_dropdown = gr.Dropdown(
|
|
64 |
iface = gr.Interface(
|
65 |
fn=video_to_descriptions,
|
66 |
inputs=[gr.Video(label="Import a Video", info="The Video to be described"), language_dropdown],
|
67 |
-
outputs="audio",
|
|
|
68 |
live=False
|
69 |
)
|
70 |
|
|
|
50 |
|
51 |
translated_text = translator(summarized_description)[0]["translation_text"]
|
52 |
print("TRANSLATION : " + translated_text)
|
53 |
+
|
54 |
+
print(audio(translated_text))
|
55 |
|
56 |
+
##audio_file = audio(translated_text)[0]["audio"]
|
57 |
+
#print("AUDIO : " + audio_file)
|
58 |
|
59 |
+
#return audio_file
|
60 |
+
return translated_text
|
61 |
|
62 |
# Create a dropdown menu with language options
|
63 |
language_dropdown = gr.Dropdown(
|
|
|
67 |
iface = gr.Interface(
|
68 |
fn=video_to_descriptions,
|
69 |
inputs=[gr.Video(label="Import a Video", info="The Video to be described"), language_dropdown],
|
70 |
+
#outputs="audio",
|
71 |
+
outputs="text",
|
72 |
live=False
|
73 |
)
|
74 |
|