Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ import torch
|
|
6 |
def TTS(text):
|
7 |
model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
8 |
tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
9 |
-
pipe = pipeline("text-to-speech", model=model,tokenizer=tokenizer)
|
10 |
return pipe(text)
|
11 |
-
iface = gr.Interface(fn=TTS, inputs="text", outputs="
|
12 |
-
iface.launch()
|
|
|
6 |
def TTS(text):
|
7 |
model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
8 |
tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
|
9 |
+
pipe = pipeline("text-to-speech", model=model,tokenizer=tokenizer)
|
10 |
return pipe(text)
|
11 |
+
iface = gr.Interface(fn=TTS, inputs="text", outputs="text")
|
12 |
+
iface.launch(share=True)
|