Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from transformers import pipeline
|
3 |
+
|
4 |
+
pipe = pipeline("object-detection", model="Charles95/autotrain-detr-cppe-v5")
|
5 |
+
|
6 |
+
examples = [
|
7 |
+
["images/1.jpg"],
|
8 |
+
["images/2.jpg"],
|
9 |
+
["images/3.jpg"],
|
10 |
+
]
|
11 |
+
|
12 |
+
demo = gr.Interface.from_pipeline(pipe, examples=examples)
|
13 |
+
|
14 |
+
demo.launch(server_name="0.0.0.0")
|