xfys commited on
Commit
f4d3cdd
·
1 Parent(s): f1a2fa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import os
2
- os.system("python -m pip install --upgrade pip; pip install cython_bbox")
3
  import gradio as gr
4
  import tempfile
5
  import track
@@ -67,23 +67,23 @@ example_video= [
67
  ]
68
 
69
  iface_Image = gr.Interface(fn=Detect,
70
- inputs=gr.Image(label="上传一张红外图像,仅支持jpg格式"),
71
  outputs=gr.Image(label="检测结果"),
72
  examples=example_image)
73
 
74
- #iface_video = gr.Interface(fn=Track,
75
- # inputs=[gr.Video(label="上传段红外视频,仅支持mp4格式"),
76
- # gr.Radio(["bytetrack", "strongsort"],
77
- # label="track methond",
78
- # info="选择追踪器",
79
- # value="bytetrack")],
80
- # outputs=gr.Video(label="追踪结果"),
81
- # examples=example_video)
82
 
83
- # demo = gr.TabbedInterface([iface_video, iface_Image], tab_names=["目标追踪", "目标检测"], title="红外目标检测追踪")
84
 
85
- # demo.launch()
86
- iface_Image.launch()
87
 
88
 
89
 
 
1
  import os
2
+ os.system("pip install cython_bbox")
3
  import gradio as gr
4
  import tempfile
5
  import track
 
67
  ]
68
 
69
  iface_Image = gr.Interface(fn=Detect,
70
+ inputs=gr.Image(label="上传一张红外图像,仅支持jpg格式"),
71
  outputs=gr.Image(label="检测结果"),
72
  examples=example_image)
73
 
74
+ iface_video = gr.Interface(fn=Track,
75
+ inputs=[gr.Video(label="上传段红外视频,仅支持mp4格式"),
76
+ gr.Radio(["bytetrack", "strongsort"],
77
+ label="track methond",
78
+ info="选择追踪器",
79
+ value="bytetrack")],
80
+ outputs=gr.Video(label="追踪结果"),
81
+ examples=example_video)
82
 
83
+ demo = gr.TabbedInterface([iface_video, iface_Image], tab_names=["目标追踪", "目标检测"], title="红外目标检测追踪")
84
 
85
+ demo.launch()
86
+ #iface_Image.launch()
87
 
88
 
89