Spaces:
Build error
Build error
Download app.py from manan/fruit-classifier: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/spaces/manan/fruit-classifier/resolve/main/app.py
- Command line
-
hf download hf://spaces/manan/fruit-classifier/app.py
-
curl -L -o app.py https://huggingface.co/spaces/manan/fruit-classifier/resolve/main/app.py
842 Bytes
| import gradio as gr | |
| from model import predict_fruit_type | |
| def predict(img): | |
| return predict_fruit_type(img) | |
| interface_options = { | |
| "title": "Fruit Classifier Demo", | |
| "description": "Yoooo this is my college assignment. A VGG-16 model that predicts the fruit type.", | |
| # "interpretation": "default", | |
| "layout": "horizontal", | |
| "examples": [ | |
| "./blue_berry_1.jpg", "./avacado_1.jpg", | |
| "./dragon_fruit_1.jpg", './cranberry_1.jpg', | |
| './jackfruit_1.jpg', './muskmelon_1.jpg', | |
| './pineapple_1.jpg', './banana_1.jpg', | |
| './orange_1.jpg', './watermelon_1.jpg', | |
| ], | |
| "allow_flagging": "never", | |
| } | |
| demo = gr.Interface( | |
| fn=predict, | |
| inputs=gr.inputs.Image(shape=(480, 480)), | |
| outputs=gr.outputs.Textbox(type="auto", label=None), | |
| **interface_options, | |
| ) | |
| demo.launch(share=False) |