debug
This commit is contained in:
parent
c58e667254
commit
af0bd24538
8
main.py
8
main.py
|
@ -180,8 +180,8 @@ def predict():
|
||||||
def feedback():
|
def feedback():
|
||||||
data = request.get_json().get("feedback")
|
data = request.get_json().get("feedback")
|
||||||
print(data)
|
print(data)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
"""
|
||||||
conn = psycopg2.connect(host="janet-pg", database=os.getenv("POSTGRES_DB"), user=os.getenv("POSTGRES_USER"), password=os.getenv("POSTGRES_PASSWORD"))
|
conn = psycopg2.connect(host="janet-pg", database=os.getenv("POSTGRES_DB"), user=os.getenv("POSTGRES_USER"), password=os.getenv("POSTGRES_PASSWORD"))
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
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)',
|
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)',
|
||||||
|
@ -191,7 +191,7 @@ def feedback():
|
||||||
data['speed'], data['intent']))
|
data['speed'], data['intent']))
|
||||||
conn.commit()
|
conn.commit()
|
||||||
cur.close()
|
cur.close()
|
||||||
|
"""
|
||||||
reply = jsonify({"status": "done"})
|
reply = jsonify({"status": "done"})
|
||||||
return reply
|
return reply
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ if __name__ == "__main__":
|
||||||
del coref_resolver
|
del coref_resolver
|
||||||
threading.Thread(target=vre_fetch, name='updatevre').start()
|
threading.Thread(target=vre_fetch, name='updatevre').start()
|
||||||
threading.Thread(target=clear_inactive, name='clear').start()
|
threading.Thread(target=clear_inactive, name='clear').start()
|
||||||
|
"""
|
||||||
conn = psycopg2.connect(host="janet-pg", database=os.getenv("POSTGRES_DB"), user=os.getenv("POSTGRES_USER"), password=os.getenv("POSTGRES_PASSWORD"))
|
conn = psycopg2.connect(host="janet-pg", database=os.getenv("POSTGRES_DB"), user=os.getenv("POSTGRES_USER"), password=os.getenv("POSTGRES_PASSWORD"))
|
||||||
|
|
||||||
cur = conn.cursor()
|
cur = conn.cursor()
|
||||||
|
@ -264,5 +264,5 @@ if __name__ == "__main__":
|
||||||
)
|
)
|
||||||
conn.commit()
|
conn.commit()
|
||||||
cur.close()
|
cur.close()
|
||||||
|
"""
|
||||||
app.run(host='0.0.0.0')
|
app.run(host='0.0.0.0')
|
||||||
|
|
Loading…
Reference in New Issue