trial
This commit is contained in:
parent
90ccc111e8
commit
31f53a495d
|
@ -4,7 +4,7 @@ import os
|
|||
import re
|
||||
import psycopg2
|
||||
import requests
|
||||
|
||||
import time
|
||||
app = Flask(__name__)
|
||||
url = os.getenv("FRONTEND_URL_WITH_PORT")
|
||||
cors = CORS(app, resources={r"/api/predict": {"origins": url},
|
||||
|
@ -48,6 +48,7 @@ def init_dm():
|
|||
return message
|
||||
@app.route("/api/predict", methods=['POST'])
|
||||
def predict():
|
||||
time.sleep(10)
|
||||
text = request.get_json().get("message")
|
||||
message = {"answer": "answer", "query": "text", "cand": "candidate", "history": "history", "modQuery": "modQuery"}
|
||||
reply = jsonify(message)
|
||||
|
|
Loading…
Reference in New Issue