Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -117,8 +117,9 @@ def spr_sidebar():
|
|
117 |
)
|
118 |
return menu
|
119 |
|
|
|
120 |
# Home Page Content
|
121 |
-
def home_page():
|
122 |
st.title("Disease Detection Web App")
|
123 |
|
124 |
uploaded_file = st.file_uploader("Upload an image", type=["png", "jpg", "jpeg"])
|
@@ -151,29 +152,18 @@ def home_page():
|
|
151 |
# Implement Eye Disease prediction (similar to others)
|
152 |
pass
|
153 |
|
154 |
-
# About Page Content
|
155 |
-
def about_page():
|
156 |
-
st.header('About the Project')
|
157 |
-
st.write("""
|
158 |
-
This web app detects different diseases using machine learning models.
|
159 |
-
- **Brain Tumor Detection**: Classifies different types of brain tumors.
|
160 |
-
- **Alzheimer Detection**: Classifies stages of Alzheimer.
|
161 |
-
- **Skin Disease Classification**: Classifies types of skin lesions.
|
162 |
-
- **Eye Disease Classification**: TBD.
|
163 |
-
""")
|
164 |
-
|
165 |
# Main Function to Run the App
|
166 |
def main():
|
167 |
selected_category = spr_sidebar()
|
168 |
|
169 |
if selected_category == "Brain Tumor":
|
170 |
-
home_page()
|
171 |
elif selected_category == "Alzheimer":
|
172 |
-
home_page()
|
173 |
elif selected_category == "Skin Disease":
|
174 |
-
home_page()
|
175 |
elif selected_category == "Eye Disease":
|
176 |
-
home_page() #
|
177 |
elif selected_category == "About":
|
178 |
about_page()
|
179 |
|
@@ -181,4 +171,3 @@ if __name__ == '__main__':
|
|
181 |
main()
|
182 |
|
183 |
|
184 |
-
|
|
|
117 |
)
|
118 |
return menu
|
119 |
|
120 |
+
|
121 |
# Home Page Content
|
122 |
+
def home_page(selected_category): # Accept selected_category as a parameter
|
123 |
st.title("Disease Detection Web App")
|
124 |
|
125 |
uploaded_file = st.file_uploader("Upload an image", type=["png", "jpg", "jpeg"])
|
|
|
152 |
# Implement Eye Disease prediction (similar to others)
|
153 |
pass
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
# Main Function to Run the App
|
156 |
def main():
|
157 |
selected_category = spr_sidebar()
|
158 |
|
159 |
if selected_category == "Brain Tumor":
|
160 |
+
home_page(selected_category) # Pass selected_category here
|
161 |
elif selected_category == "Alzheimer":
|
162 |
+
home_page(selected_category) # Pass selected_category here
|
163 |
elif selected_category == "Skin Disease":
|
164 |
+
home_page(selected_category) # Pass selected_category here
|
165 |
elif selected_category == "Eye Disease":
|
166 |
+
home_page(selected_category) # Pass selected_category here
|
167 |
elif selected_category == "About":
|
168 |
about_page()
|
169 |
|
|
|
171 |
main()
|
172 |
|
173 |
|
|