BSJ2004 commited on
Commit
e393210
1 Parent(s): f79466a

Upload preditive.py

Browse files
Files changed (1) hide show
  1. preditive.py +21 -0
preditive.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ def display_predicted_crimes(year):
4
+ if year == 2025:
5
+ st.markdown('<iframe src="https://661a6f7a824e4d86fd1f8607--musical-kheer-bc563e.netlify.app/" width="700" height="500"></iframe>', unsafe_allow_html=True)
6
+ elif year == 2026:
7
+ st.markdown('<iframe src="https://661a70638576dc86b614a8b0--delightful-chebakia-aafaa1.netlify.app/" width="700" height="500"></iframe>', unsafe_allow_html=True)
8
+ else:
9
+ st.write("Year not supported.")
10
+
11
+ def main():
12
+ st.title("Prediction for top 5 cases")
13
+ st.write("Select a year and click 'Predict' to see the predicted crimes for that year.")
14
+
15
+ year = st.selectbox("Select Year", [2025, 2026])
16
+
17
+ if st.button("Predict"):
18
+ display_predicted_crimes(year)
19
+
20
+ if __name__ == "__main__":
21
+ main()