rise-ai / app.py
markpeace's picture
basic FAQ functionality is working
8b9c87b
raw
history blame
656 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();
#from train.faq import train
#train();
#from agent._create import agent
#agent({})