qywok commited on
Commit
3ec9405
·
verified ·
1 Parent(s): 8e75448

Update restful/onnx_utilities.py

Browse files
Files changed (1) hide show
  1. restful/onnx_utilities.py +3 -2
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': self.truncate_2_decimal(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