rise-ai / app.py
markpeace's picture
can now recommend a single goal
3ee5d26
raw
history blame contribute delete
873 Bytes
#ESTABLISH THE SERVER
from flask import Flask,request
from flask_cors import CORS
from dotenv import load_dotenv
# Initializing flask app
app = Flask(__name__)
CORS(app)
load_dotenv()
@app.route("/ask", methods=['GET','POST'])
def index():
from agent._create import agent
return agent(request.values)
@app.route("/train/faq", methods=['GET','POST'])
def train_faq():
from train.faq import train
return train();
@app.route("/train/products", methods=['GET','POST'])
def train_products():
from train.products import train
return train();
@app.route("/plan/recommend", methods=['GET','POST'])
def recommend_plan_steps():
from plan.recommend import recommend
return recommend(request.values);
#from plan.recommend import recommend
#recommend({});
#from train.faq import train
#train();
#from agent._create import agent
#agent({})