Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,6 +61,7 @@ def plotdata(t, s, i,r,R0, e=None):
|
|
61 |
a.legend()
|
62 |
|
63 |
plt.tight_layout()
|
|
|
64 |
|
65 |
#final model
|
66 |
def SIR(country,t_infective):
|
@@ -103,8 +104,8 @@ def main():
|
|
103 |
# Show SIR
|
104 |
SIR_param = SIR(country,recovery)
|
105 |
|
106 |
-
st.success(all_location[country]['total_cases'].plot())
|
107 |
-
st.success(SIR(country,recovery))
|
108 |
st.success("SIR model parameters for "+str(country)+" is")
|
109 |
st.success("R0 = "+str(SIR_param[0]))
|
110 |
st.success("Beta = "+str(SIR_param[3]))
|
|
|
61 |
a.legend()
|
62 |
|
63 |
plt.tight_layout()
|
64 |
+
st.pyplot(fig)
|
65 |
|
66 |
#final model
|
67 |
def SIR(country,t_infective):
|
|
|
104 |
# Show SIR
|
105 |
SIR_param = SIR(country,recovery)
|
106 |
|
107 |
+
st.success(st.pyplot(all_location[country]['total_cases'].plot()))
|
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[3]))
|