Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -38,19 +38,19 @@ def yolov8_func(image,
|
|
38 |
render.save(predicted_image_save_path)
|
39 |
return predicted_image_save_path, f"Acne condition: {severity}", recommendation
|
40 |
|
41 |
-
# Create the Gradio
|
42 |
with gr.Blocks() as yolo_app:
|
43 |
gr.Markdown("# YOLOv8: An Object Detection for Acne")
|
44 |
|
45 |
with gr.Row():
|
46 |
-
with gr.Column():
|
47 |
input_image = gr.Image(type="filepath", label="Input Image")
|
48 |
image_size = gr.Slider(minimum=320, maximum=1280, step=32, value=640, label="Image Size")
|
49 |
conf_thresh = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.15, label="Confidence Threshold")
|
50 |
iou_thresh = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.2, label="IOU Threshold")
|
51 |
submit_btn = gr.Button("Submit")
|
52 |
|
53 |
-
with gr.Column():
|
54 |
output_image = gr.Image(type="filepath", label="Output Image")
|
55 |
acne_condition = gr.Textbox(label="Acne Condition")
|
56 |
recommendation = gr.Textbox(label="Recommendation")
|
|
|
38 |
render.save(predicted_image_save_path)
|
39 |
return predicted_image_save_path, f"Acne condition: {severity}", recommendation
|
40 |
|
41 |
+
# Create the Gradio
|
42 |
with gr.Blocks() as yolo_app:
|
43 |
gr.Markdown("# YOLOv8: An Object Detection for Acne")
|
44 |
|
45 |
with gr.Row():
|
46 |
+
with gr.Column(scale=1): # Left side with input
|
47 |
input_image = gr.Image(type="filepath", label="Input Image")
|
48 |
image_size = gr.Slider(minimum=320, maximum=1280, step=32, value=640, label="Image Size")
|
49 |
conf_thresh = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.15, label="Confidence Threshold")
|
50 |
iou_thresh = gr.Slider(minimum=0, maximum=1, step=0.05, value=0.2, label="IOU Threshold")
|
51 |
submit_btn = gr.Button("Submit")
|
52 |
|
53 |
+
with gr.Column(scale=1): # Right side with output
|
54 |
output_image = gr.Image(type="filepath", label="Output Image")
|
55 |
acne_condition = gr.Textbox(label="Acne Condition")
|
56 |
recommendation = gr.Textbox(label="Recommendation")
|