Download app.py from hmb/testshare: direct link, hf CLI and curl.
- Browser
- Download file 357 Bytes
-
https://huggingface.co/spaces/hmb/testshare/resolve/main/app.py
- Command line
-
hf download hf://spaces/hmb/testshare/app.py
-
curl -L -o app.py https://huggingface.co/spaces/hmb/testshare/resolve/main/app.py
357 Bytes
| import os | |
| import gradio as gr | |
| def image_mod(image): | |
| return image.rotate(45) | |
| demo = gr.Interface(image_mod, gr.Image(type="pil"), "image", | |
| flagging_options=["blurry", "incorrect", "other"], examples=[ | |
| os.path.join(os.path.dirname(__file__), "images/dog.png"), | |
| ]) | |
| if __name__ == "__main__": | |
| demo.launch(max_file_size="70kb") | |