Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,41 +1,32 @@
|
|
1 |
-
|
2 |
-
from
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
@app.errorhandler(404)
|
36 |
-
def page_not_found(error):
|
37 |
-
return render_template('404.html'), 404
|
38 |
-
|
39 |
-
|
40 |
-
if __name__ == '__main__':
|
41 |
-
app.run(host="0.0.0.0", port=80, use_reloader=True, debug=True)
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from streamlit_option_menu import option_menu
|
3 |
+
import prediction
|
4 |
+
import home
|
5 |
+
import contact
|
6 |
+
|
7 |
+
|
8 |
+
st.write('### Age and Gender Prediction')
|
9 |
+
st.write('##### This page is created by [Simran Bola]')
|
10 |
+
st.markdown('---')
|
11 |
+
|
12 |
+
|
13 |
+
selected = option_menu(None, ["Home", "Predict","Contact"],
|
14 |
+
icons=['house', 'gear-fill', 'envelope-at-fill'],
|
15 |
+
menu_icon="cast", default_index=0, orientation="vertical",
|
16 |
+
styles={
|
17 |
+
"icon": {"color": "yellow", "font-size": "20px"},
|
18 |
+
"nav-link": {"font-size": "20px", "text-align": "left", "margin":"1px", "--hover-color": "#eee"},
|
19 |
+
"nav-link-selected": {"background-color": "grey"},
|
20 |
+
}
|
21 |
+
)
|
22 |
+
|
23 |
+
selected
|
24 |
+
|
25 |
+
|
26 |
+
if selected == 'Predict':
|
27 |
+
prediction.run()
|
28 |
+
|
29 |
+
elif selected == 'Home':
|
30 |
+
home.run()
|
31 |
+
else:
|
32 |
+
contact.run()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|