idkash1 commited on
Commit
6b749ba
·
verified ·
1 Parent(s): 74e53b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,7 +65,7 @@ def process_analysis(task_id, text, model_name, topic, threshold):
65
 
66
  @app.route('/detectHumanInAIText/checkText', methods=['POST'])
67
  def check_text():
68
- # received_token = request.headers.get("HF_TOKEN")
69
  print(f'HF_TOKEN {HF_TOKEN}')
70
  # if received_token != HF_TOKEN:
71
  # return jsonify({"error": "Unauthorized"}), 403 # Forbidden
@@ -86,7 +86,7 @@ def check_text():
86
  thread.start()
87
 
88
  # Return taskId immediately
89
- return jsonify({'taskId': HF_TOKEN}), 202
90
 
91
  @app.route('/detectHumanInAIText/getAnalyzeResults', methods=['GET'])
92
  def get_results():
 
65
 
66
  @app.route('/detectHumanInAIText/checkText', methods=['POST'])
67
  def check_text():
68
+ received_token = request.headers.get("HF_TOKEN")
69
  print(f'HF_TOKEN {HF_TOKEN}')
70
  # if received_token != HF_TOKEN:
71
  # return jsonify({"error": "Unauthorized"}), 403 # Forbidden
 
86
  thread.start()
87
 
88
  # Return taskId immediately
89
+ return jsonify({'taskId': received_token}), 202
90
 
91
  @app.route('/detectHumanInAIText/getAnalyzeResults', methods=['GET'])
92
  def get_results():