Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,8 +61,8 @@ def plotdata(t, s, i,r,R0, e=None):
|
|
61 |
a.legend()
|
62 |
|
63 |
plt.tight_layout()
|
64 |
-
|
65 |
-
|
66 |
|
67 |
#final model
|
68 |
def SIR(country,t_infective):
|
@@ -85,7 +85,7 @@ def SIR(country,t_infective):
|
|
85 |
e = None
|
86 |
|
87 |
|
88 |
-
return
|
89 |
|
90 |
def main():
|
91 |
st.title("SIR Model for Monkeypox")
|
@@ -104,11 +104,11 @@ def main():
|
|
104 |
# Show SIR
|
105 |
SIR_param = SIR(country,recovery)
|
106 |
|
107 |
-
st.success(st.pyplot(
|
108 |
-
st.success(st.pyplot(SIR(country,recovery)
|
109 |
st.success("SIR model parameters for "+str(country)+" is")
|
110 |
-
st.success("R0 = "+str(SIR_param[
|
111 |
-
st.success("Beta = "+str(SIR_param[
|
112 |
st.success("Gamma = "+str(SIR_param[3]))
|
113 |
|
114 |
# Run main()
|
|
|
61 |
a.legend()
|
62 |
|
63 |
plt.tight_layout()
|
64 |
+
st.pyplot(fig)
|
65 |
+
|
66 |
|
67 |
#final model
|
68 |
def SIR(country,t_infective):
|
|
|
85 |
e = None
|
86 |
|
87 |
|
88 |
+
return R0,t_infective,beta,gamma
|
89 |
|
90 |
def main():
|
91 |
st.title("SIR Model for Monkeypox")
|
|
|
104 |
# Show SIR
|
105 |
SIR_param = SIR(country,recovery)
|
106 |
|
107 |
+
st.success(st.pyplot(all_location[country]['total_cases']))
|
108 |
+
st.success(st.pyplot(SIR(country,recovery)))
|
109 |
st.success("SIR model parameters for "+str(country)+" is")
|
110 |
+
st.success("R0 = "+str(SIR_param[0]))
|
111 |
+
st.success("Beta = "+str(SIR_param[2]))
|
112 |
st.success("Gamma = "+str(SIR_param[3]))
|
113 |
|
114 |
# Run main()
|