Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
a16a11f
1
Parent(s):
d62b128
Update app files
Browse files
app.py
CHANGED
|
@@ -124,7 +124,7 @@ if submit:
|
|
| 124 |
with st.spinner(text="Downloading model weights ... "):
|
| 125 |
detection_model = get_model()
|
| 126 |
|
| 127 |
-
image_size =
|
| 128 |
|
| 129 |
with st.spinner(text="Performing prediction ... "):
|
| 130 |
output = sahi_yolov8m_inference(
|
|
@@ -152,7 +152,7 @@ with col2:
|
|
| 152 |
img2=st.session_state["output_2"],
|
| 153 |
label1='Uploaded Diagram',
|
| 154 |
label2='Model Inference',
|
| 155 |
-
width=
|
| 156 |
starting_position=50,
|
| 157 |
show_labels=True,
|
| 158 |
make_responsive=True,
|
|
|
|
| 124 |
with st.spinner(text="Downloading model weights ... "):
|
| 125 |
detection_model = get_model()
|
| 126 |
|
| 127 |
+
image_size = 1280
|
| 128 |
|
| 129 |
with st.spinner(text="Performing prediction ... "):
|
| 130 |
output = sahi_yolov8m_inference(
|
|
|
|
| 152 |
img2=st.session_state["output_2"],
|
| 153 |
label1='Uploaded Diagram',
|
| 154 |
label2='Model Inference',
|
| 155 |
+
width=800,
|
| 156 |
starting_position=50,
|
| 157 |
show_labels=True,
|
| 158 |
make_responsive=True,
|
utils.py
CHANGED
|
@@ -30,8 +30,8 @@ def sahi_yolov8m_inference(
|
|
| 30 |
visual_result = sahi.utils.cv.visualize_object_predictions(
|
| 31 |
image=numpy.array(image),
|
| 32 |
object_prediction_list=prediction_result.object_prediction_list,
|
| 33 |
-
rect_th=
|
| 34 |
-
text_size=
|
| 35 |
)
|
| 36 |
|
| 37 |
output = Image.fromarray(visual_result["image"])
|
|
|
|
| 30 |
visual_result = sahi.utils.cv.visualize_object_predictions(
|
| 31 |
image=numpy.array(image),
|
| 32 |
object_prediction_list=prediction_result.object_prediction_list,
|
| 33 |
+
rect_th=3,
|
| 34 |
+
text_size=4
|
| 35 |
)
|
| 36 |
|
| 37 |
output = Image.fromarray(visual_result["image"])
|