Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,14 +17,14 @@ def modelspeech(texts):
|
|
| 17 |
wav = model_vits(input_ids=inputs["input_ids"]).waveform#.detach()
|
| 18 |
# display(Audio(wav, rate=model.config.sampling_rate))
|
| 19 |
return model_vits.config.sampling_rate,wav#remove_noise_nr(wav)
|
| 20 |
-
def greet(id):
|
| 21 |
global GK
|
| 22 |
b=int(id)
|
| 23 |
while True:
|
| 24 |
GK+=1
|
| 25 |
-
texts=[
|
| 26 |
out=modelspeech(texts)
|
| 27 |
yield f"namber is {GK}"
|
| 28 |
|
| 29 |
-
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 30 |
demo.launch()
|
|
|
|
| 17 |
wav = model_vits(input_ids=inputs["input_ids"]).waveform#.detach()
|
| 18 |
# display(Audio(wav, rate=model.config.sampling_rate))
|
| 19 |
return model_vits.config.sampling_rate,wav#remove_noise_nr(wav)
|
| 20 |
+
def greet(text,id):
|
| 21 |
global GK
|
| 22 |
b=int(id)
|
| 23 |
while True:
|
| 24 |
GK+=1
|
| 25 |
+
texts=[text]*b
|
| 26 |
out=modelspeech(texts)
|
| 27 |
yield f"namber is {GK}"
|
| 28 |
|
| 29 |
+
demo = gr.Interface(fn=greet, inputs=["text","text"], outputs="text")
|
| 30 |
demo.launch()
|