wasm-splitor / app.py
wasmdashai's picture
Update app.py
3618ab9 verified
raw
history blame contribute delete
522 Bytes
import gradio as gr
from gradio_client import Client
CLIENT=None
def create_session():
client = Client("wasmdashai/wasm-spad",download_files=False)
return client
def streamwav(text):
#if client is None:
client=create_session()
result = client.submit(
text=text,
api_name="/text_to_speech",
)
for chk in result:
#print(chk)
return chk['url']
demo = gr.Interface(fn=streamwav, inputs=["text"], outputs=["text"])
demo.launch()