Skip to content

Instantly share code, notes, and snippets.

@kingabzpro
Created February 24, 2022 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingabzpro/11fc1f7c14d52d4a6cc7c638640f0cc9 to your computer and use it in GitHub Desktop.
Save kingabzpro/11fc1f7c14d52d4a6cc7c638640f0cc9 to your computer and use it in GitHub Desktop.
Deploying Gradio App on Spaces Using DagsHub
HF_TOKEN = os.getenv("HF_TOKEN")
hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "savtadepth-flags")
iface = gr.Interface(
gen,
gr.inputs.Image(shape=(640, 480), type="numpy"),
"image",
title=title,
description=description,
article=article,
examples=examples,
theme="peach",
allow_flagging="manual",
flagging_callback=hf_writer
)
iface.launch(enable_queue=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment