Spaces:
Runtime error
Runtime error
Disable the text-to-speech
Browse files
app.py
CHANGED
@@ -51,7 +51,7 @@ model_name = 'hackathon-pln-es/poem-gen-spanish-t5-small'
|
|
51 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
52 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
53 |
|
54 |
-
tts_es = gr.Interface.load("huggingface/facebook/tts_transformer-es-css10")
|
55 |
|
56 |
def make_poem(author, sentiment, words, text):
|
57 |
num_lines=5
|
@@ -85,8 +85,9 @@ def make_poem(author, sentiment, words, text):
|
|
85 |
|
86 |
pre_output = pre_output.replace('.', ' ')
|
87 |
poem += '\n' + pre_output
|
88 |
-
audio = tts_es(poem)
|
89 |
-
return poem, audio
|
|
|
90 |
|
91 |
iface = gr.Interface(
|
92 |
fn=make_poem,
|
@@ -100,7 +101,7 @@ iface = gr.Interface(
|
|
100 |
outputs=
|
101 |
[
|
102 |
gr.outputs.Textbox(label="Texto generado"),
|
103 |
-
gr.outputs.Audio(label="Primeros segundos")
|
104 |
],
|
105 |
examples=
|
106 |
[
|
|
|
51 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
52 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
53 |
|
54 |
+
# tts_es = gr.Interface.load("huggingface/facebook/tts_transformer-es-css10")
|
55 |
|
56 |
def make_poem(author, sentiment, words, text):
|
57 |
num_lines=5
|
|
|
85 |
|
86 |
pre_output = pre_output.replace('.', ' ')
|
87 |
poem += '\n' + pre_output
|
88 |
+
# audio = tts_es(poem)
|
89 |
+
# return poem, audio
|
90 |
+
return poem
|
91 |
|
92 |
iface = gr.Interface(
|
93 |
fn=make_poem,
|
|
|
101 |
outputs=
|
102 |
[
|
103 |
gr.outputs.Textbox(label="Texto generado"),
|
104 |
+
# gr.outputs.Audio(label="Primeros segundos")
|
105 |
],
|
106 |
examples=
|
107 |
[
|