Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
from espnet2.bin.tts_inference import Text2Speech
|
|
|
|
|
4 |
|
5 |
def generateTextAndAudio(inputText, numGen):
|
6 |
|
@@ -11,10 +13,10 @@ def generateTextAndAudio(inputText, numGen):
|
|
11 |
# then get the generated text from the dictionary using the `generated_text` key
|
12 |
genText = textOutput[0]['generated_text']
|
13 |
|
14 |
-
print("-"*
|
15 |
print("Input Text:", inputText)
|
16 |
print("Generated Text:", genText)
|
17 |
-
print("-"*
|
18 |
|
19 |
# --- Generating the Audio ---
|
20 |
# With the newly generated text, generate some speech
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
from espnet2.bin.tts_inference import Text2Speech
|
4 |
+
import warnings
|
5 |
+
warnings.filterwarnings('ignore')
|
6 |
|
7 |
def generateTextAndAudio(inputText, numGen):
|
8 |
|
|
|
13 |
# then get the generated text from the dictionary using the `generated_text` key
|
14 |
genText = textOutput[0]['generated_text']
|
15 |
|
16 |
+
print("-"*75)
|
17 |
print("Input Text:", inputText)
|
18 |
print("Generated Text:", genText)
|
19 |
+
print("-"*75)
|
20 |
|
21 |
# --- Generating the Audio ---
|
22 |
# With the newly generated text, generate some speech
|