sahal-mulki's picture
Update app.py
a47f7fe
raw
history blame contribute delete
556 Bytes
import gradio as gr
from transformers import pipeline
classifier = pipeline("image-classification", model="sahal-mulki/spotting-diffusion")
def predict(image):
predictions = pipeline(image)
return {p["label"]: p["score"] for p in predictions}
gr.Interface(fn=classify_image,
inputs=gr.inputs.Image(shape=(256, 256)),
outputs=gr.outputs.Label(num_top_classes=2),
# examples=["banana.jpg", "car.jpg"],
theme="default",
css=".footer{display:none !important}").launch()