Create app.py
Browse files
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
|