wasmdashai commited on
Commit
7fef4b1
·
verified ·
1 Parent(s): 3008371

Update app.py

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