Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import matplotlib.pyplot as plt
|
|
| 5 |
|
| 6 |
# Page configuration
|
| 7 |
st.set_page_config(page_title="Crime Rate Predictor", layout="centered")
|
| 8 |
-
st.title("🔮 Crime Rate Prediction for Indian States
|
| 9 |
|
| 10 |
# CSV path (Hosted online)
|
| 11 |
csv_path = "https://huggingface.co/spaces/MLDeveloper/crime_rate_predicition/resolve/main/RS_Session_255_AS_116.1%20(2).csv"
|
|
@@ -52,8 +52,8 @@ try:
|
|
| 52 |
})
|
| 53 |
|
| 54 |
# # Show predictions
|
| 55 |
-
|
| 56 |
-
|
| 57 |
|
| 58 |
# Plot
|
| 59 |
fig, ax = plt.subplots()
|
|
|
|
| 5 |
|
| 6 |
# Page configuration
|
| 7 |
st.set_page_config(page_title="Crime Rate Predictor", layout="centered")
|
| 8 |
+
st.title("🔮 Crime Rate Prediction for Indian States")
|
| 9 |
|
| 10 |
# CSV path (Hosted online)
|
| 11 |
csv_path = "https://huggingface.co/spaces/MLDeveloper/crime_rate_predicition/resolve/main/RS_Session_255_AS_116.1%20(2).csv"
|
|
|
|
| 52 |
})
|
| 53 |
|
| 54 |
# # Show predictions
|
| 55 |
+
st.subheader(f"📈 Predicted Crime Rate for {state_input} ({year_input} to 2027)")
|
| 56 |
+
st.dataframe(result_df, use_container_width=True)
|
| 57 |
|
| 58 |
# Plot
|
| 59 |
fig, ax = plt.subplots()
|