Spaces:
Build error
Build error
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) |