Spaces:
Running
Running
Update restful/onnx_utilities.py
Browse files
restful/onnx_utilities.py
CHANGED
@@ -59,7 +59,8 @@ class Utilities:
|
|
59 |
denorm_price = (value * (max_close - min_close)) + min_close
|
60 |
|
61 |
last_date += pd.Timedelta(days=1)
|
62 |
-
predicted_prices[last_date.strftime('%Y-%m-%d')] = float(denorm_price)
|
|
|
63 |
|
64 |
lst_seq = np.roll(lst_seq, shift=-1, axis=1)
|
65 |
lst_seq[:, -1, -1] = value
|
@@ -69,7 +70,7 @@ class Utilities:
|
|
69 |
# for date, price in predicted_prices.items()
|
70 |
# ]
|
71 |
predictions = [
|
72 |
-
{'date': date, 'price':
|
73 |
for date, price in predicted_prices.items()
|
74 |
]
|
75 |
|
|
|
59 |
denorm_price = (value * (max_close - min_close)) + min_close
|
60 |
|
61 |
last_date += pd.Timedelta(days=1)
|
62 |
+
# predicted_prices[last_date.strftime('%Y-%m-%d')] = float(denorm_price)
|
63 |
+
predicted_prices[last_date] = self.truncate_2_decimal(denorm_price)
|
64 |
|
65 |
lst_seq = np.roll(lst_seq, shift=-1, axis=1)
|
66 |
lst_seq[:, -1, -1] = value
|
|
|
70 |
# for date, price in predicted_prices.items()
|
71 |
# ]
|
72 |
predictions = [
|
73 |
+
{'date': date.strftime('%Y-%m-%d'), 'price': price}
|
74 |
for date, price in predicted_prices.items()
|
75 |
]
|
76 |
|