jaumaras commited on
Commit
054e722
·
1 Parent(s): 876c090

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -8
app.py CHANGED
@@ -1,11 +1,17 @@
1
- ##! pip install gradio
2
- import gradio_client
3
  import gradio as gr
 
4
 
5
- def hello_world(name):
6
- return "HEllo..." + name +"!!!!"
7
- def hello_world2(name):
8
- return "HEllo..." + name +"!!!!"
9
 
10
- interface = gr.Interface(fn = hello_world, inputs='text',outputs="text")
11
- interface.launch()
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import os
3
 
4
+ # save your HF API token from https:/hf.co/settings/tokens as an env variable to avoid rate limiting
5
+ auth_token = os.getenv("auth_token")
 
 
6
 
7
+ # automatically load the interface from a HF model
8
+ # you can remove the api_key parameter if you don't care about rate limiting.
9
+ demo = gr.load(
10
+ "huggingface/facebook/wav2vec2-base-960h",
11
+ title="Speech-to-text",
12
+ inputs="mic",
13
+ description="Let me try to guess what you're saying!",
14
+ hf_token=auth_token
15
+ )
16
+
17
+ demo.launch()