Spaces:
Sleeping
Sleeping
Update model.py
Browse files
model.py
CHANGED
|
@@ -11,34 +11,34 @@ def classify(img):
|
|
| 11 |
result = model.predict(np.array([im]))
|
| 12 |
a = np.argmax(result)
|
| 13 |
c=""
|
| 14 |
-
|
| 15 |
if a==0:
|
| 16 |
-
return "Provide the medical Imaging of the mentioned categories"
|
| 17 |
st.write('________________________________________________')
|
|
|
|
|
|
|
| 18 |
if a==1:
|
| 19 |
st.write('________________________________________________')
|
| 20 |
c = bone_net(im)
|
| 21 |
-
st.write('________________________________________________')
|
| 22 |
if a==2:
|
| 23 |
st.write('________________________________________________')
|
| 24 |
c = brain_net(im)
|
| 25 |
-
st.write('________________________________________________')
|
| 26 |
if a==3:
|
| 27 |
st.write('________________________________________________')
|
| 28 |
c = Eye_net(im)
|
| 29 |
-
st.write('________________________________________________')
|
| 30 |
if a==4:
|
| 31 |
st.write('________________________________________________')
|
| 32 |
c = kidney_net(im)
|
| 33 |
-
st.write('________________________________________________')
|
| 34 |
if a==5:
|
| 35 |
st.write('________________________________________________')
|
| 36 |
c = chest_net(im)
|
| 37 |
-
st.write('________________________________________________')
|
| 38 |
if a==6:
|
| 39 |
st.write('________________________________________________')
|
| 40 |
c = skin_net(im)
|
| 41 |
-
st.write('________________________________________________')
|
| 42 |
return c
|
| 43 |
|
| 44 |
|
|
@@ -58,6 +58,7 @@ def brain_net(img):
|
|
| 58 |
result = model.predict(np.array([img]))
|
| 59 |
ans = np.argmax(result)
|
| 60 |
b = ""
|
|
|
|
| 61 |
if ans==3:
|
| 62 |
b = "Glioma: Can range from low-grade (mild) to high-grade (severe).\n\nAvoid activities that could cause head injury, such as contact sports.\nTake steps to manage seizures, which can be a common symptom of gliomas.\nAvoid exposure to radiation, as this can increase the risk of developing a glioma.\nTake steps to reduce stress, which can exacerbate symptoms and affect overall health.\nWork with a healthcare provider to manage any other underlying medical conditions that could impact treatment."
|
| 63 |
if ans==2:
|
|
|
|
| 11 |
result = model.predict(np.array([im]))
|
| 12 |
a = np.argmax(result)
|
| 13 |
c=""
|
| 14 |
+
|
| 15 |
if a==0:
|
|
|
|
| 16 |
st.write('________________________________________________')
|
| 17 |
+
return "Provide the medical Imaging of the mentioned categories"
|
| 18 |
+
# st.write('________________________________________________')
|
| 19 |
if a==1:
|
| 20 |
st.write('________________________________________________')
|
| 21 |
c = bone_net(im)
|
| 22 |
+
# st.write('________________________________________________')
|
| 23 |
if a==2:
|
| 24 |
st.write('________________________________________________')
|
| 25 |
c = brain_net(im)
|
| 26 |
+
# st.write('________________________________________________')
|
| 27 |
if a==3:
|
| 28 |
st.write('________________________________________________')
|
| 29 |
c = Eye_net(im)
|
| 30 |
+
# st.write('________________________________________________')
|
| 31 |
if a==4:
|
| 32 |
st.write('________________________________________________')
|
| 33 |
c = kidney_net(im)
|
| 34 |
+
# st.write('________________________________________________')
|
| 35 |
if a==5:
|
| 36 |
st.write('________________________________________________')
|
| 37 |
c = chest_net(im)
|
| 38 |
+
# st.write('________________________________________________')
|
| 39 |
if a==6:
|
| 40 |
st.write('________________________________________________')
|
| 41 |
c = skin_net(im)
|
|
|
|
| 42 |
return c
|
| 43 |
|
| 44 |
|
|
|
|
| 58 |
result = model.predict(np.array([img]))
|
| 59 |
ans = np.argmax(result)
|
| 60 |
b = ""
|
| 61 |
+
st.markdown('#### Precautions to be taken:')
|
| 62 |
if ans==3:
|
| 63 |
b = "Glioma: Can range from low-grade (mild) to high-grade (severe).\n\nAvoid activities that could cause head injury, such as contact sports.\nTake steps to manage seizures, which can be a common symptom of gliomas.\nAvoid exposure to radiation, as this can increase the risk of developing a glioma.\nTake steps to reduce stress, which can exacerbate symptoms and affect overall health.\nWork with a healthcare provider to manage any other underlying medical conditions that could impact treatment."
|
| 64 |
if ans==2:
|