Upload 3 files
Browse files- app.py +35 -0
- flood.pkl +3 -0
- requirements.txt +7 -0
app.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pickle
|
| 3 |
+
|
| 4 |
+
st.title("Predict flood probability :water_polo:")
|
| 5 |
+
model=pickle.load(open("flood.pkl","rb"))
|
| 6 |
+
MonsoonIntensity=st.number_input("MonsoonIntensity",0,16)
|
| 7 |
+
TopographyDrainage=st.number_input("TopographyDrainage",0,18)
|
| 8 |
+
RiverManagement=st.number_input("RiverManagement",0,16)
|
| 9 |
+
Deforestation=st.number_input("Deforestation",0,17)
|
| 10 |
+
Urbanization=st.number_input("Urbanization",0,17)
|
| 11 |
+
ClimateChange=st.number_input("ClimateChange",0,17)
|
| 12 |
+
DamsQuality=st.number_input("DamsQuality",0,16)
|
| 13 |
+
Siltation=st.number_input("Siltation",0,16)
|
| 14 |
+
AgriculturalPractices=st.number_input("AgriculturalPractices",0,16)
|
| 15 |
+
Encroachments=st.number_input("Encroachments",0,18)
|
| 16 |
+
IneffectiveDisasterPreparedness=st.number_input("IneffectiveDisasterPreparedness",0,16)
|
| 17 |
+
DrainageSystems=st.number_input("DrainageSystems",0,17)
|
| 18 |
+
CoastalVulnerability=st.number_input("CoastalVulnerability",0,17)
|
| 19 |
+
Landslides=st.number_input("Landslides",0,16)
|
| 20 |
+
Watersheds=st.number_input("Watersheds",0,16)
|
| 21 |
+
DeterioratingInfrastructure=st.number_input("DeterioratingInfrastructure",0,17)
|
| 22 |
+
PopulationScore =st.number_input("PopulationScore ",0,18)
|
| 23 |
+
WetlandLoss=st.number_input("WetlandLoss",0,19)
|
| 24 |
+
InadequatePlanning =st.number_input("InadequatePlanning ",0,16)
|
| 25 |
+
PoliticalFactors=st.number_input("PoliticalFactors",0,16)
|
| 26 |
+
if st.button("Tahmin et"):
|
| 27 |
+
tahmin=model.predict([[MonsoonIntensity,TopographyDrainage,RiverManagement,Deforestation,Urbanization,ClimateChange,
|
| 28 |
+
DamsQuality,Siltation,AgriculturalPractices,Encroachments,IneffectiveDisasterPreparedness,DrainageSystems,
|
| 29 |
+
CoastalVulnerability,Landslides,Watersheds,DeterioratingInfrastructure,PopulationScore,WetlandLoss,
|
| 30 |
+
InadequatePlanning,PoliticalFactors
|
| 31 |
+
]])
|
| 32 |
+
# tahmin=round(tahmin[0][0],2)
|
| 33 |
+
st.success(f"Flood Prediction:{tahmin}")
|
| 34 |
+
|
| 35 |
+
|
flood.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7690474cc9cac6041c67bffeb5f587f07df50b0a3516608c963dfcda8411728e
|
| 3 |
+
size 1039
|
requirements.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#paketi kurmak için ihtiyacımız olan paketlerin isimlerini yazıyoruz
|
| 2 |
+
|
| 3 |
+
#huggingface için requirements
|
| 4 |
+
streamlit
|
| 5 |
+
scikit-learn
|
| 6 |
+
# pickle
|
| 7 |
+
# pandas
|