flagging / app.py
Abubakar Abid
Update app.py
4b24692
raw
history blame
375 Bytes
#### ignore these lines
import os
os.system("pip uninstall -y gradio")
os.system("pip install gradio==2.5.8a0")
### -------------------------
import gradio as gr
HF_TOKEN = os.getenv('HF_TOKEN')
hf_saver = gr.HuggingFaceDatasetSaver(HF_TOKEN, "test-image-classifier-dataset")
gr.Interface.load("huggingface/google/vit-base-patch16-224", flagging_callback=hf_saver).launch()