File size: 767 Bytes
a2fe7f8
 
 
4be7201
a2fe7f8
ce3ac86
a2fe7f8
f11df80
 
a2fe7f8
f11df80
cfbafc7
ce3ac86
2a6cd36
a2fe7f8
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import gradio as gr

HF_TOKEN = os.getenv('HF_TOKEN')

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

iface = gr.Interface(
    lambda x:"Test",
    inputs="mic",
    outputs="textbox",
    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-demo2](https://huggingface.co/datasets/abidlabs/crowdsourced-speech-demo2). This Space is experimental, and please only flag data that you are comfortable adding to a public dataset!",
    allow_flagging="manual",
    flagging_callback=hf_writer)

iface.launch()