opex792 commited on
Commit
bea8834
·
verified ·
1 Parent(s): d5c1df0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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['genresList']}\nОписание: {movie['description']}"
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['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"
 
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"