Aktualizovat sk1/backend/app.py

This commit is contained in:
Tetiana Mohorian 2025-04-30 09:54:15 +00:00
parent 71e32912cd
commit 55dc649360

View File

@ -1,4 +1,3 @@
from flask import Flask, request, jsonify, Response, send_from_directory
from flask_cors import CORS
from flask_caching import Cache
@ -64,7 +63,6 @@ def sync_history_file():
def save_to_history(text, prediction_label):
timestamp = get_current_time()
try:
# Проверка на дубликат
cursor.execute(
"SELECT 1 FROM history WHERE text = %s AND prediction = %s",
(text, prediction_label)