Spaces:
Running
Running
File size: 342 Bytes
5252e66 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from __future__ import annotations
import gradio as gr
import numpy as np
def image_classifier(input_image: np.ndarray) -> dict[str, float]:
"""Output a dummy probability for the image to be a dog or a cat."""
return {"cat": 0.3, "dog": 0.7}
demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
demo.launch() |