CatmanJr commited on
Commit
5a6ed3e
·
verified ·
1 Parent(s): b059d1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -51,11 +51,10 @@ def process_frame(frame, classes_input):
51
  def main():
52
  # 创建Gradio界面
53
  with gr.Blocks() as demo:
54
- gr.Markdown("# YOLOv11s-Earth 实时检测")
55
  with gr.Row():
56
- cam_input = gr.Image(type="numpy", sources=["webcam"], streaming=True, label="摄像头输入")
57
- classes_input = gr.Textbox(label="输入类别(逗号分隔)", placeholder="例如:0,1,2")
58
- output = gr.Image(label="检测结果", type="numpy")
59
 
60
  cam_input.stream(
61
  process_frame,
 
51
  def main():
52
  # 创建Gradio界面
53
  with gr.Blocks() as demo:
 
54
  with gr.Row():
55
+ cam_input = gr.Image(type="numpy", sources=["webcam"], streaming=True, label="Webcam")
56
+ classes_input = gr.Textbox(label="New classes (comma-separated)", placeholder="e.g.: airplane, airport, tennis court")
57
+ output = gr.Image(label="Results", type="numpy", height=480) # Set height to 480
58
 
59
  cam_input.stream(
60
  process_frame,