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