Jiranuwat commited on
Commit
98d2076
·
1 Parent(s): 60e1882

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -61,7 +61,8 @@ def plotdata(t, s, i,r,R0, e=None):
61
  a.legend()
62
 
63
  plt.tight_layout()
64
- st.pyplot(fig)
 
65
 
66
 
67
  #final model
@@ -85,7 +86,7 @@ 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,7 +105,7 @@ def main():
104
  # Show SIR
105
  SIR_param = SIR(country,recovery)
106
 
107
-
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[2]))
 
61
  a.legend()
62
 
63
  plt.tight_layout()
64
+
65
+ return fig
66
 
67
 
68
  #final model
 
86
  e = None
87
 
88
 
89
+ return R0,t_infective,beta,gamma,plotdata(t, s, i,r,R0)
90
 
91
  def main():
92
  st.title("SIR Model for Monkeypox")
 
105
  # Show SIR
106
  SIR_param = SIR(country,recovery)
107
 
108
+ st.success(st.pyplot(SIR_param[-1]))
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]))