Spaces:
Runtime error
Runtime error
Download app.py from rockybites/test_space: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/rockybites/test_space/resolve/main/app.py
- Command line
-
hf download hf://spaces/rockybites/test_space/app.py
-
curl -L -o app.py https://huggingface.co/spaces/rockybites/test_space/resolve/main/app.py
392 Bytes
| import gradio as gr | |
| import os | |
| HF_TOKEN = os.getenv('HF_TOKEN') | |
| hf_writer = gr.HuggingFaceDatasetSaver(HF_TOKEN, "demo") | |
| def greet(test, check): | |
| if check: test += 'heh' | |
| return "Hello " + test + "!!", "burp!" | |
| iface = gr.Interface(fn=greet, inputs=["text", "checkbox"], outputs=[gr.Textbox(label='greeting'), "text"], allow_flagging='auto', flagging_callback=hf_writer) | |
| iface.launch() |