emirkaanozdemr
commited on
Commit
•
0c60a31
1
Parent(s):
20b504e
Upload 3 files
Browse files- app.py +32 -0
- covid1_model.pkl +3 -0
- covid2_model2.pkl +3 -0
app.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import pickle
|
3 |
+
import numpy as np
|
4 |
+
|
5 |
+
st.title("COVID19 GLOBAL FORECAST")
|
6 |
+
coc=st.number_input("Confirmed Cases")
|
7 |
+
lat=st.number_input("Latitude")
|
8 |
+
lon=st.number_input("Longitude")
|
9 |
+
model_selection=st.radio("Select your model",("Regression","Classification"))
|
10 |
+
if model_selection is "Regression":
|
11 |
+
file_path = 'covid1_model.pkl'
|
12 |
+
with open(file_path, 'rb') as file:
|
13 |
+
model = pickle.load(file)
|
14 |
+
data=[coc,lat,lon]
|
15 |
+
if st.button("Predict"):
|
16 |
+
data=np.array(data)
|
17 |
+
if len(data.shape) == 1:
|
18 |
+
data = np.expand_dims(data, axis=0)
|
19 |
+
prediction=model.predict(data)
|
20 |
+
st.write(prediction)
|
21 |
+
else:
|
22 |
+
file_path = 'covid2_model2.pkl'
|
23 |
+
with open(file_path, 'rb') as file:
|
24 |
+
model = pickle.load(file)
|
25 |
+
data=[lat,lon]
|
26 |
+
if st.button("Predict"):
|
27 |
+
data=np.array(data)
|
28 |
+
if len(data.shape) == 1:
|
29 |
+
data = np.expand_dims(data, axis=0)
|
30 |
+
prediction=model.predict(data)
|
31 |
+
pred=np.argmax(prediction)
|
32 |
+
st.write(pred)
|
covid1_model.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ab9618123e254d30b15681e130b827c29796788d0b2314d95e30300ceadbb4a0
|
3 |
+
size 40681
|
covid2_model2.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bff2f9fafbad375bd5907c13c5b847844f97fd38b5e61be0ff47eb76581d7d12
|
3 |
+
size 3847020
|