Spaces:
Runtime error
Runtime error
masa729406
commited on
Commit
ยท
a23b013
1
Parent(s):
80b056c
Update app.py
Browse files
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 =
|
203 |
-
d_y = datetime.date.today() + datetime.timedelta(days = -
|
204 |
|
205 |
# ๅๆฅใฎใใใใผใฟๆฝๅบ
|
206 |
if __name__ == "__main__":
|
207 |
start_date = d_y
|
208 |
-
end_date =
|
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"
|
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()
|