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