Spaces:
Runtime error
Runtime error
File size: 616 Bytes
0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 ccae91e 0b69d23 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import gradio as gr
from transformer import pipeline
# asr = pipeline("automatic-speech-recognition", model="B-K/ReVoiceAI-W2V-BERT-Thai-IPA")
g2p = pipeline("translation", model="B-K/umt5-thai-g2p-v2-0.5k")
def respond(
# audio,
target
):
target_phoneme = g2p(target)[0]["translation"]
return target_phoneme
"""
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
"""
demo = gr.Interface(
respond,
inputs=[
gr.Textbox(label="target")
],
outputs="text"
)
if __name__ == "__main__":
demo.launch()
|