fixed fixed display issue
This commit is contained in:
parent
3b7ffc213a
commit
a48ab3ef57
2 changed files with 4 additions and 4 deletions
|
|
@ -26,9 +26,9 @@ else:
|
||||||
with open("english_words.txt") as f:
|
with open("english_words.txt") as f:
|
||||||
valid_words = set(w.strip() for w in f)
|
valid_words = set(w.strip() for w in f)
|
||||||
print("Mode anglais : dictionnaire anglais chargé.")
|
print("Mode anglais : dictionnaire anglais chargé.")
|
||||||
model_path = "GoogleNews-vectors-negative300.bin.gz"
|
model_path = "google_news_reduced.kv"
|
||||||
print("Chargement du modèle anglais...")
|
print("Chargement du modèle anglais...")
|
||||||
model = KeyedVectors.load_word2vec_format(model_path, binary=True)
|
model = KeyedVectors.load(model_path)
|
||||||
|
|
||||||
if first_word not in model:
|
if first_word not in model:
|
||||||
print(f"Mot inconnu du modèle: {first_word}")
|
print(f"Mot inconnu du modèle: {first_word}")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import os
|
||||||
from flask import send_from_directory
|
from flask import send_from_directory
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.secret_key = os.urandom(24)
|
app.secret_key = "cemantle_solver_secret_key_fixed"
|
||||||
|
|
||||||
# Utilitaires globaux (en mémoire pour chaque session)
|
# Utilitaires globaux (en mémoire pour chaque session)
|
||||||
game_state = {}
|
game_state = {}
|
||||||
|
|
@ -52,7 +52,7 @@ def init_game():
|
||||||
session['tol'] = tol
|
session['tol'] = tol
|
||||||
session['model_path'] = model_path
|
session['model_path'] = model_path
|
||||||
session['word_indexes'] = word_indexes
|
session['word_indexes'] = word_indexes
|
||||||
session['history'] = [] # Liste des {word, score/pass, remaining}
|
session['history'] = []
|
||||||
return jsonify({'count': len(words), 'history': session['history']})
|
return jsonify({'count': len(words), 'history': session['history']})
|
||||||
|
|
||||||
@app.route('/next', methods=['POST'])
|
@app.route('/next', methods=['POST'])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue