Allow pull data from python all the way through to the UI
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import os
|
||||
import json
|
||||
import numpy as np
|
||||
os.environ["CUDA_VISIBLE_DEVICES"] = "-1"
|
||||
import yfinance as yf
|
||||
import features
|
||||
@@ -33,8 +35,8 @@ def Predict():
|
||||
predictions = reconstructed_model.predict(df)
|
||||
|
||||
# 'predictions' will be a 2D array, flatten it if you want a simple list
|
||||
flat_predictions = predictions.flatten()
|
||||
flat_predictions = predictions.flatten().tolist()
|
||||
|
||||
print(f"Predicted Target_Close_Tomorrow: {flat_predictions}")
|
||||
|
||||
return flat_predictions
|
||||
return json.dumps(flat_predictions)
|
||||
Reference in New Issue
Block a user