File size: 595 Bytes
8802df4
895148c
2041085
43a9647
4b4bebd
2041085
 
 
 
43a9647
2041085
 
8802df4
2041085
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import gradio as gr
HF_TOKEN = os.getenv('HF_TOKEN')
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "save_audio")

iface = gr.Interface(
    calculator,
    ["number", gr.Radio(["add", "subtract", "multiply", "divide"]), "number"],
    "number",
    #description="Check out the crowd-sourced dataset at: [https://huggingface.co/datasets/aliabd/crowdsourced-calculator-demo](https://huggingface.co/datasets/aliabd/crowdsourced-calculator-demo)",
    allow_flagging="manual",
    flagging_options=["wrong sign", "off by one", "other"],
    flagging_callback=hf_writer
)

iface.launch()