Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ def predict(text, history):
|
|
57 |
list_history = history_useful[0].split('</s> <s>')
|
58 |
history.append((list_history[-2], list_history[-1]))
|
59 |
|
60 |
-
# pasamos el resultado a
|
61 |
spanish_text = translator_en_es(response)
|
62 |
result_es = spanish_text[0]['translation_text']
|
63 |
sound_file = 'output.wav'
|
@@ -78,7 +78,7 @@ El modelo usa:
|
|
78 |
- Modelo conversacional [facebook/blenderbot-400M-distill](https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Julien%21+How+are+you%3F),
|
79 |
- Para las traducciones [Helsinki-NLP](https://huggingface.co/Helsinki-NLP)
|
80 |
- Para la respuesta de voz [gTTS](https://pypi.org/project/gTTS/)
|
81 |
-
|
82 |
"""
|
83 |
|
84 |
gr.Interface(fn=predict,
|
|
|
57 |
list_history = history_useful[0].split('</s> <s>')
|
58 |
history.append((list_history[-2], list_history[-1]))
|
59 |
|
60 |
+
# pasamos el resultado a gtts para obtener el audio
|
61 |
spanish_text = translator_en_es(response)
|
62 |
result_es = spanish_text[0]['translation_text']
|
63 |
sound_file = 'output.wav'
|
|
|
78 |
- Modelo conversacional [facebook/blenderbot-400M-distill](https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Julien%21+How+are+you%3F),
|
79 |
- Para las traducciones [Helsinki-NLP](https://huggingface.co/Helsinki-NLP)
|
80 |
- Para la respuesta de voz [gTTS](https://pypi.org/project/gTTS/)
|
81 |
+
\n... y mucha magia ☺
|
82 |
"""
|
83 |
|
84 |
gr.Interface(fn=predict,
|