File size: 873 Bytes
76c5345 bbe9d13 76c5345 bbe9d13 76c5345 bbe9d13 0e6989e 76c5345 0e6989e 257931c af86562 11fa3a4 796ceef f44405d 01f10c0 f44405d 285d6e2 3ee5d26 f44405d 8b9c87b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
#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({})
|