Update app.py
Browse files
app.py
CHANGED
|
@@ -207,7 +207,7 @@ def process_batch(batch):
|
|
| 207 |
|
| 208 |
try:
|
| 209 |
for movie in batch:
|
| 210 |
-
embedding_string = f"Название: {movie['name']}\nГод: {movie['year']}\nЖанры: {movie['
|
| 211 |
string_crc32 = calculate_crc32(embedding_string)
|
| 212 |
|
| 213 |
# Проверяем существующий эмбеддинг
|
|
@@ -346,7 +346,7 @@ def search_movies(query, top_k=20):
|
|
| 346 |
movie = next((m for m in movies_data if m['id'] == movie_id), None)
|
| 347 |
if movie:
|
| 348 |
output += f"<h3>{movie['name']} ({movie['year']})</h3>\n"
|
| 349 |
-
output += f"<p><strong>Жанры:</strong> {movie['
|
| 350 |
output += f"<p><strong>Описание:</strong> {movie['description']}</p>\n"
|
| 351 |
output += f"<p><strong>Релевантность:</strong> {similarity:.4f}</p>\n"
|
| 352 |
output += "<hr>\n"
|
|
|
|
| 207 |
|
| 208 |
try:
|
| 209 |
for movie in batch:
|
| 210 |
+
embedding_string = f"Название: {movie['name']}\nГод: {movie['year']}\nЖанры: {movie['genreslist']}\nОписание: {movie['description']}"
|
| 211 |
string_crc32 = calculate_crc32(embedding_string)
|
| 212 |
|
| 213 |
# Проверяем существующий эмбеддинг
|
|
|
|
| 346 |
movie = next((m for m in movies_data if m['id'] == movie_id), None)
|
| 347 |
if movie:
|
| 348 |
output += f"<h3>{movie['name']} ({movie['year']})</h3>\n"
|
| 349 |
+
output += f"<p><strong>Жанры:</strong> {movie['genreslist']}</p>\n"
|
| 350 |
output += f"<p><strong>Описание:</strong> {movie['description']}</p>\n"
|
| 351 |
output += f"<p><strong>Релевантность:</strong> {similarity:.4f}</p>\n"
|
| 352 |
output += "<hr>\n"
|