hridha76 commited on
Commit
d7060ee
·
verified ·
1 Parent(s): 5f2dea0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import VitsModel, AutoTokenizer
2
+ import torch
3
+
4
+ model = VitsModel.from_pretrained("SeyedAli/Arabic-Speech-synthesis")
5
+ tokenizer = AutoTokenizer.from_pretrained("SeyedAli/Arabic-Speech-synthesis")
6
+
7
+ text = "السلام عليكم ورحمة الله وبركاته"
8
+ inputs = tokenizer(text, return_tensors="pt")
9
+
10
+ with torch.no_grad():
11
+ output = model(**inputs).waveform