trial
This commit is contained in:
parent
6680cdc612
commit
78a2819feb
|
@ -2,10 +2,10 @@ FROM python:3.8
|
|||
|
||||
WORKDIR /backend
|
||||
|
||||
COPY requirements_simple.txt .
|
||||
COPY requirements_main.txt .
|
||||
|
||||
RUN pip install -r requirements_simple.txt
|
||||
RUN pip install -r requirements_main.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["python", "main_simple.py"]
|
||||
ENTRYPOINT ["python", "main.py"]
|
||||
|
|
6
main.py
6
main.py
|
@ -157,7 +157,7 @@ def predict():
|
|||
def feedback():
|
||||
data = request.get_json().get("feedback")
|
||||
print(data)
|
||||
|
||||
|
||||
cur.execute('INSERT INTO feedback_experimental (query, history, janet_modified_query, is_modified_query_correct, user_modified_query, evidence_useful, 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, %s)',
|
||||
(data['query'], data['history'], data['modQuery'],
|
||||
data['queryModCorrect'], data['correctQuery'], data['evidence'], data['janetResponse'], data['preferredResponse'], data['length'],
|
||||
|
@ -203,13 +203,13 @@ if __name__ == "__main__":
|
|||
threading.Thread(target=vre_fetch, name='updatevre').start()
|
||||
threading.Thread(target=clear_inactive, name='clear').start()
|
||||
|
||||
|
||||
|
||||
cur.execute('CREATE TABLE IF NOT EXISTS feedback_experimental (id serial PRIMARY KEY,'
|
||||
'query text NOT NULL,'
|
||||
'history text NOT NULL,'
|
||||
'janet_modified_query text NOT NULL,'
|
||||
'is_modified_query_correct text NOT NULL,'
|
||||
'user_modified_query text NOT NULL, evidence_useful text NOT NULL,'
|
||||
'user_modified_query text, evidence_useful text NOT NULL,'
|
||||
'response text NOT NULL,'
|
||||
'preferred_response text,'
|
||||
'response_length_feedback text NOT NULL,'
|
||||
|
|
Loading…
Reference in New Issue