gathemin commited on
Commit
5252e66
·
verified ·
1 Parent(s): f6d2919

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __future__ import annotations
2
+
3
+ import gradio as gr
4
+ import numpy as np
5
+
6
+
7
+ def image_classifier(input_image: np.ndarray) -> dict[str, float]:
8
+ """Output a dummy probability for the image to be a dog or a cat."""
9
+ return {"cat": 0.3, "dog": 0.7}
10
+
11
+
12
+ demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label")
13
+ demo.launch()