File size: 656 Bytes
76c5345
 
bbe9d13
 
 
76c5345
 
 
 
bbe9d13
76c5345
 
bbe9d13
0e6989e
76c5345
0e6989e
 
257931c
 
 
af86562
 
11fa3a4
 
 
 
796ceef
 
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
#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({})