masa729406 commited on
Commit
a23b013
ยท
1 Parent(s): 80b056c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -199,13 +199,13 @@ linear_regression = LinearRegression()
199
  model = linear_regression.fit(X,y)
200
 
201
  d_today = datetime.date.today()
202
- d_tom = datetime.date.today() + datetime.timedelta(days = -1)
203
- d_y = datetime.date.today() + datetime.timedelta(days = -2)
204
 
205
  # ๅ‰ๆ—ฅใฎใ‚ใ˜ใƒ‡ใƒผใ‚ฟๆŠฝๅ‡บ
206
  if __name__ == "__main__":
207
  start_date = d_y
208
- end_date = d_tom
209
  df_aji_pre = get_fish_price_data(start_date=start_date, end_date=end_date)
210
  df_aji_pre['date'] = df_aji_pre['date'].astype(int)
211
 
@@ -255,7 +255,7 @@ def outbreak(date):
255
  fig = plt.figure()
256
  plt.plot(df_train['date_ymd'], df_train['audience'], label='original')
257
  plt.plot(df_aji_ft_pre['date_ymd'], df_aji_ft_pre['audience_pred'], '*', label='predict')
258
- plt.title(f"prediction of audince ใ€Œtoday prediction value : {pred}ใ€")
259
  plt.ylabel("audience")
260
  plt.xlabel("Days")
261
  plt.legend()
 
199
  model = linear_regression.fit(X,y)
200
 
201
  d_today = datetime.date.today()
202
+ d_tom = datetime.date.today() + datetime.timedelta(days = 1)
203
+ d_y = datetime.date.today() + datetime.timedelta(days = -1)
204
 
205
  # ๅ‰ๆ—ฅใฎใ‚ใ˜ใƒ‡ใƒผใ‚ฟๆŠฝๅ‡บ
206
  if __name__ == "__main__":
207
  start_date = d_y
208
+ end_date = d_today
209
  df_aji_pre = get_fish_price_data(start_date=start_date, end_date=end_date)
210
  df_aji_pre['date'] = df_aji_pre['date'].astype(int)
211
 
 
255
  fig = plt.figure()
256
  plt.plot(df_train['date_ymd'], df_train['audience'], label='original')
257
  plt.plot(df_aji_ft_pre['date_ymd'], df_aji_ft_pre['audience_pred'], '*', label='predict')
258
+ plt.title(f"today prediction value : {pred}")
259
  plt.ylabel("audience")
260
  plt.xlabel("Days")
261
  plt.legend()