Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
| 3 |
|
| 4 |
classifier = pipeline("text-to-speech", model="GuGai/text_to_speech_G")
|
| 5 |
def main():
|
|
@@ -10,8 +12,8 @@ def main():
|
|
| 10 |
# clicked==True only when the button is clicked
|
| 11 |
clicked = st.form_submit_button("Submit text")
|
| 12 |
if clicked:
|
| 13 |
-
results = classifier(text)
|
| 14 |
-
|
| 15 |
|
| 16 |
if __name__ == "__main__":
|
| 17 |
main()
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
+
from IPython.display import Audio
|
| 4 |
+
Audio(output['audio'], rate=output['sampling_rate'])
|
| 5 |
|
| 6 |
classifier = pipeline("text-to-speech", model="GuGai/text_to_speech_G")
|
| 7 |
def main():
|
|
|
|
| 12 |
# clicked==True only when the button is clicked
|
| 13 |
clicked = st.form_submit_button("Submit text")
|
| 14 |
if clicked:
|
| 15 |
+
results = classifier([text])
|
| 16 |
+
Audio(results['audio'], rate=results['sampling_rate'])
|
| 17 |
|
| 18 |
if __name__ == "__main__":
|
| 19 |
main()
|