Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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="
|
58 |
-
output = gr.Image(label="
|
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,
|