SeyedAli commited on
Commit
73316e5
1 Parent(s): d37896c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
2
  from transformers import VitsModel, AutoTokenizer
3
  import torch
 
 
 
4
  def TTS(text):
5
  model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
6
  tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
7
  pipe = pipeline("text-to-speech", model=model,tokenizer=tokenizer)
8
- text = "من با ژاله جلسه داشتم."
9
 
10
  iface = gr.Interface(fn=TTS, inputs=text, outputs=pipe(text))
11
  iface.launch()
 
1
  import gradio as gr
2
  from transformers import VitsModel, AutoTokenizer
3
  import torch
4
+
5
+ text = "من با ژاله جلسه داشتم."
6
+
7
  def TTS(text):
8
  model = VitsModel.from_pretrained("SeyedAli/Persian-Speech-synthesis")
9
  tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Persian-Speech-synthesis")
10
  pipe = pipeline("text-to-speech", model=model,tokenizer=tokenizer)
 
11
 
12
  iface = gr.Interface(fn=TTS, inputs=text, outputs=pipe(text))
13
  iface.launch()