File size: 248 Bytes
6c98acd
 
 
 
 
 
 
eb9acfc
1
2
3
4
5
6
7
8
9
import os
import gradio as gr

HF_API_TOKEN = os.getenv("HF_API_TOKEN")

hf_writer = gr.HuggingFaceDatasetSaver(HF_API_TOKEN, "callback-test")

gr.Interface(lambda x:x, "text", "text", allow_flagging="manual", flagging_callback=hf_writer).launch()