Update app.py
Browse files
app.py
CHANGED
|
@@ -35,7 +35,7 @@ def process_analysis(task_id, text, model_name, topic):
|
|
| 35 |
print('Validate data')
|
| 36 |
answer = validate_data(text, model_name, topic)
|
| 37 |
if answer != '':
|
| 38 |
-
task_results[task_id] = {'error': answer}
|
| 39 |
return
|
| 40 |
|
| 41 |
topic = check_topic(topic)
|
|
@@ -53,7 +53,7 @@ def process_analysis(task_id, text, model_name, topic):
|
|
| 53 |
]
|
| 54 |
|
| 55 |
# Store the result
|
| 56 |
-
task_results[task_id] = {'message': message, 'hcRelativeToThreshold': hcRelativeToThreshold, 'sentences': sentences}
|
| 57 |
|
| 58 |
@app.route('/detectHumanInAIText/checkText', methods=['POST'])
|
| 59 |
def check_text():
|
|
|
|
| 35 |
print('Validate data')
|
| 36 |
answer = validate_data(text, model_name, topic)
|
| 37 |
if answer != '':
|
| 38 |
+
task_results[task_id] = {'status': 'error', 'error': answer}
|
| 39 |
return
|
| 40 |
|
| 41 |
topic = check_topic(topic)
|
|
|
|
| 53 |
]
|
| 54 |
|
| 55 |
# Store the result
|
| 56 |
+
task_results[task_id] = {'status': 'completed', 'message': message, 'hcRelativeToThreshold': hcRelativeToThreshold, 'sentences': sentences}
|
| 57 |
|
| 58 |
@app.route('/detectHumanInAIText/checkText', methods=['POST'])
|
| 59 |
def check_text():
|