File size: 738 Bytes
a2fe7f8
 
 
4be7201
a2fe7f8
 
 
 
 
 
cfbafc7
c8e119a
a2fe7f8
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import gradio as gr

HF_TOKEN = os.getenv('HF_TOKEN')

hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "crowdsourced-speech-demo")

iface = gr.Interface.load(
    "models/facebook/wav2vec2-base-960h",
    inputs="mic",
    title="Crowdsourced Dataset for Speech to Text",
    article="This demo uses facebook/wav2vec2-base-960h for a speech-to-text model. Any data that gets flagged is added to the crowdsourced *dataset* found here: [https://huggingface.co/datasets/abidlabs/crowdsourced-speech-demo](https://huggingface.co/datasets/abidlabs/crowdsourced-speech-demo). This Space is experimental, and please only flag data that you are comfortable adding to a public dataset!",
    flagging_callback=hf_writer)

iface.launch()