SeyedAli commited on
Commit
d65de17
β€’
1 Parent(s): d814bb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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="audio")
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)