Saahil-doryu's picture
Update app.py
53cc2da verified
raw
history blame contribute delete
569 Bytes
import gradio as gr
from inference import load_model, run_inference
net_feat, net_cls = load_model()
def classify_image(image):
return run_inference(image, net_feat, net_cls)
example_images = ["example.jpeg", "example2.webp","image2.jpg"]
interface = gr.Interface(
fn=classify_image,
inputs=gr.Image(type="filepath"),
outputs=gr.Textbox(label="Predicted clothing type:"),
title="Clothing1M Classifier",
description="Upload an image of clothing image.",
examples=example_images
)
if __name__ == "__main__":
interface.launch()