aliabd commited on
Commit
75bfc4b
·
1 Parent(s): 46ea47f

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. DESCRIPTION.md +1 -0
  2. README.md +8 -8
  3. run.ipynb +1 -0
  4. run.py +17 -0
DESCRIPTION.md ADDED
@@ -0,0 +1 @@
 
 
1
+ Automatic speech recognition English. Record from your microphone and the app will transcribe the audio.
README.md CHANGED
@@ -1,12 +1,12 @@
 
1
  ---
2
- title: Automatic-speech-recognition 3-x
3
- emoji: 📚
4
- colorFrom: pink
5
- colorTo: yellow
6
  sdk: gradio
7
- sdk_version: 4.3.0
8
- app_file: app.py
9
  pinned: false
 
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
+
2
  ---
3
+ title: automatic-speech-recognition_3-x
4
+ emoji: 🔥
5
+ colorFrom: indigo
6
+ colorTo: indigo
7
  sdk: gradio
8
+ sdk_version: 3.50.1
9
+ app_file: run.py
10
  pinned: false
11
+ hf_oauth: true
12
  ---
 
 
run.ipynb ADDED
@@ -0,0 +1 @@
 
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: automatic-speech-recognition\n", "### Automatic speech recognition English. Record from your microphone and the app will transcribe the audio.\n", " "]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "import os\n", "\n", "# save your HF API token from https:/hf.co/settings/tokens as an env variable to avoid rate limiting\n", "auth_token = os.getenv(\"auth_token\")\n", "\n", "# automatically load the interface from a HF model \n", "# you can remove the api_key parameter if you don't care about rate limiting. \n", "demo = gr.load(\n", " \"huggingface/facebook/wav2vec2-base-960h\",\n", " title=\"Speech-to-text\",\n", " inputs=\"mic\",\n", " description=\"Let me try to guess what you're saying!\",\n", " hf_token=auth_token\n", ")\n", "\n", "demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()