Lasion commited on
Commit
6ca3b52
1 Parent(s): 85006c3
Files changed (2) hide show
  1. app.py +6 -3
  2. yolov8n-nckh2023.pt +3 -0
app.py CHANGED
@@ -1,7 +1,10 @@
1
  import gradio as gr
 
2
 
3
- def greet(name):
4
- return "Hello " + name + "!!"
 
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
7
  iface.launch()
 
1
  import gradio as gr
2
+ from ultralytics import YOLO
3
 
4
+ def run(source):
5
+ global model
6
+ return model.predict(source=frame, conf=.5, iou=.5, stream=False, save=True, show=False)
7
 
8
+ model = YOLO("models/yolov8m-nckh2023.pt") # Select YOLO model
9
+ iface = gr.Interface(fn=run, inputs="text", outputs="image")
10
  iface.launch()
yolov8n-nckh2023.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e45b0413e7f7eb9987f87f1d27b9187d3fa2941e2c06c8183b09a2ecd03cd451
3
+ size 6249976