Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ import time
|
|
| 20 |
from human_text_detect import detect_human_text
|
| 21 |
import os
|
| 22 |
|
| 23 |
-
|
| 24 |
|
| 25 |
app = Flask(__name__)
|
| 26 |
CORS(app)
|
|
@@ -66,7 +66,7 @@ def process_analysis(task_id, text, model_name, topic, threshold):
|
|
| 66 |
@app.route('/detectHumanInAIText/checkText', methods=['POST'])
|
| 67 |
def check_text():
|
| 68 |
# received_token = request.headers.get("HF_TOKEN")
|
| 69 |
-
|
| 70 |
# if received_token != HF_TOKEN:
|
| 71 |
# return jsonify({"error": "Unauthorized"}), 403 # Forbidden
|
| 72 |
|
|
|
|
| 20 |
from human_text_detect import detect_human_text
|
| 21 |
import os
|
| 22 |
|
| 23 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 24 |
|
| 25 |
app = Flask(__name__)
|
| 26 |
CORS(app)
|
|
|
|
| 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
|
| 72 |
|