File size: 577 Bytes
eaec508
59426f2
eaec508
59426f2
 
 
 
 
 
 
 
73a2ed7
59426f2
1ca3995
59426f2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gradio as gr
import os

# save your HF API token from https:/hf.co/settings/tokens as an env variable to avoid rate limiting
auth_token = os.getenv("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")

# automatically load the interface from a HF model 
# you can remove the api_key parameter if you don't care about rate limiting. 
demo = gr.Interface.load(
    "huggingface/facebook/wav2vec2-base-960h",
    title="Speech-to-text",
    inputs=gr.Inputs.Audio(source="microphone"),
    description="Let me try to guess what you're saying!",
    #api_key=auth_token
)

demo.launch()