Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,7 @@ class_names_dict = {
|
|
26 |
8: 'Pathological fracture',
|
27 |
9: 'Spiral Fracture'
|
28 |
}
|
29 |
-
|
30 |
-
class_list_string = "\n".join([f"{index}: {name}" for index, name in class_names_dict.items()])
|
31 |
|
32 |
def predict_image(img_path):
|
33 |
# Load the image using PIL
|
@@ -52,8 +51,21 @@ iface = gr.Interface(
|
|
52 |
gr.Image(label=" Bone Fracture Detection ", value=fixed_image_url)
|
53 |
],
|
54 |
title="Bone Break Classification",
|
55 |
-
description=
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
theme="ParityError/Interstellar",
|
58 |
examples=examples,
|
59 |
)
|
|
|
26 |
8: 'Pathological fracture',
|
27 |
9: 'Spiral Fracture'
|
28 |
}
|
29 |
+
|
|
|
30 |
|
31 |
def predict_image(img_path):
|
32 |
# Load the image using PIL
|
|
|
51 |
gr.Image(label=" Bone Fracture Detection ", value=fixed_image_url)
|
52 |
],
|
53 |
title="Bone Break Classification",
|
54 |
+
description=(
|
55 |
+
"Upload an X-ray image, and the model will predict the type of bone break. \n\n"
|
56 |
+
"Classes Available:\n"
|
57 |
+
"1: Avulsion fracture\n"
|
58 |
+
"2: Comminuted fracture\n"
|
59 |
+
"3: Fracture Dislocation\n"
|
60 |
+
"4: Greenstick fracture\n"
|
61 |
+
"5: Hairline Fracture\n"
|
62 |
+
"6: Impacted fracture\n"
|
63 |
+
"7: Longitudinal fracture\n"
|
64 |
+
"8: Oblique fracture\n"
|
65 |
+
"9: Pathological fracture\n"
|
66 |
+
"10: Spiral Fracture"
|
67 |
+
),
|
68 |
+
,
|
69 |
theme="ParityError/Interstellar",
|
70 |
examples=examples,
|
71 |
)
|