trapezius60 commited on
Commit
d125da1
·
verified ·
1 Parent(s): d7b1745

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from PIL import Image
3
+
4
+ def simple_detect(image):
5
+ if image is None:
6
+ return "No image provided"
7
+ return f"Image received: {image.size}"
8
+
9
+ demo = gr.Interface(
10
+ fn=simple_detect,
11
+ inputs=gr.Image(type="pil"),
12
+ outputs="text"
13
+ )
14
+
15
+ if __name__ == "__main__":
16
+ demo.launch()