fix_feedback

This commit is contained in:
ahmed531998 2023-04-07 03:23:01 +02:00
parent 3fbca7eb49
commit 5550207277
2 changed files with 4 additions and 2 deletions

View File

@ -2,8 +2,10 @@ FROM python:3.8
WORKDIR /app
COPY . .
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
ENTRYPOINT ["python", "main.py"]

View File

@ -99,7 +99,7 @@ def predict():
@app.route('/feedback', methods = ['POST'])
def feedback():
data = request.get_json()['feedback']
data = request.get_json().get("feedback")
print(data)
cur.execute('INSERT INTO feedback_trial (query, history, janet_modified_query, is_modified_query_correct, user_modified_query, response, preferred_response, response_length_feedback, response_fluency_feedback, response_truth_feedback, response_useful_feedback, response_time_feedback, response_intent) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',