gradio/demo/sst_or_tts/run.py
Ömer Faruk Özdemir a1509850dc
Merge in Examples and cache_examples fixes
* soft reset and remove a commit,
then commit the further commits  again

* fix flagging for tests

* format fix

* fixes

Co-authored-by: Ali <aliabid94@gmail.com>
2022-04-11 13:18:42 -07:00

28 lines
601 B
Python

import gradio as gr
title = "GPT-J-6B"
tts_examples = [
"I love learning machine learning",
"How do you do?",
]
tts_demo = gr.Interface.load(
"huggingface/facebook/fastspeech2-en-ljspeech",
title=None,
examples=tts_examples,
description="Give me something to say!",
)
stt_demo = gr.Interface.load(
"huggingface/facebook/wav2vec2-base-960h",
title=None,
inputs="mic",
description="Let me try to guess what you're saying!",
)
demo = gr.TabbedInterface([tts_demo, stt_demo], ["Text-to-speech", "Speech-to-text"])
if __name__ == "__main__":
demo.launch()