OK, thanks, so I guess I should not try and run the code on the editor. I can load all the Flask utilities I need. I just need load_model (from TF Keras) (to load the model that I already trained and already uploaded to python anywhere) and model.predict (from TF Keras). Yes, and saw that post (which I will do). But, how do I get the packages so I can use them? Do I not need to:
from tensorflow.python.keras.models import load_model
import pandas as pd
import numpy as np
import tensorflow as tf
From flask I had to import "request" to get my Post and Get working.......
The two sets of commands (in addition to np and pd) that I need to get working in my flask app (and work fine on my local host are:
comment field (load trained model)
MODEL_PATH = 'Churn_model_1'
flask_model = load_model(MODEL_PATH)
flask_model._make_predict_function()
And
(comment field) make prediction after I process the input data on the web page using np and pd
preds = flask_model.predict(processed_features).flatten()
I am not sure how I shold proceed. Should I stop what I am doing in the editor and do something else? Should I start learning how to create the virtual environment and load the needed packages in there?
Thanks in advance