Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,18 @@
|
|
1 |
import gradio as gr
|
2 |
GK=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
def greet(name):
|
5 |
global GK
|
6 |
while True:
|
7 |
GK+=1
|
|
|
8 |
yield f"namber is {GK}"
|
9 |
|
10 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
|
1 |
import gradio as gr
|
2 |
GK=0
|
3 |
+
from transformers import AutoTokenizer,VitsModel
|
4 |
+
import torch
|
5 |
+
token=os.environ.get("key_")
|
6 |
+
tokenizer = AutoTokenizer.from_pretrained("wasmdashai/vits-ar-sa-huba",token=token)
|
7 |
+
#device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
+
model_vits=VitsModel.from_pretrained("wasmdashai/vits-ar-sa-huba",token=token)#.to(device)
|
9 |
+
|
10 |
|
11 |
def greet(name):
|
12 |
global GK
|
13 |
while True:
|
14 |
GK+=1
|
15 |
+
model_vits=VitsModel.from_pretrained("wasmdashai/vits-ar-sa-huba",token=token)#.to(device)
|
16 |
yield f"namber is {GK}"
|
17 |
|
18 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|