Another runtime error
Browse files
app.py
CHANGED
@@ -88,9 +88,9 @@ def detect_objects(model_name,url_input,image_input,threshold):
|
|
88 |
confi = box.conf
|
89 |
# final_str_abv += str() + "__" + str(box.cls) + "__" + str(box.conf) + "__" + str(box) + "\n"
|
90 |
if confi >= threshold:
|
91 |
-
final_str_abv += f"Detected `{label}` with confidence `{
|
92 |
else:
|
93 |
-
final_str_else += f"Detected `{label}` with confidence `{
|
94 |
|
95 |
final_str = "{:*^50}\n".format("ABOVE THRESHOLD OR EQUAL") + final_str_abv + "\n{:*^50}\n".format("BELOW THRESHOLD")+final_str_else
|
96 |
|
|
|
88 |
confi = box.conf
|
89 |
# final_str_abv += str() + "__" + str(box.cls) + "__" + str(box.conf) + "__" + str(box) + "\n"
|
90 |
if confi >= threshold:
|
91 |
+
final_str_abv += f"Detected `{label}` with confidence `{confi}` at location `{coordinates}`\n"
|
92 |
else:
|
93 |
+
final_str_else += f"Detected `{label}` with confidence `{confi}` at location `{coordinates}`\n"
|
94 |
|
95 |
final_str = "{:*^50}\n".format("ABOVE THRESHOLD OR EQUAL") + final_str_abv + "\n{:*^50}\n".format("BELOW THRESHOLD")+final_str_else
|
96 |
|