ninooo96 commited on
Commit
fc338d9
·
1 Parent(s): bc7da0f
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -119,15 +119,12 @@ def render_results(ids, scores, ui_lang="it"):
119
 
120
  html = "<div style='font-family: sans-serif;'>"
121
 
122
- data = []
123
  for row in ordered_books:
124
  score = scores.get(row[0], 0.0)
125
  title, author, year, rating, summary = row[1], row[2], row[3], row[4], row[5]
126
 
127
  # Pulizia
128
  author = str(author).replace('"', '').replace("[","").replace("]", "")
129
- data.append([title, author, year, rating, f"{score:.3f}"])
130
-
131
  if not summary: summary = "No summary available."
132
 
133
  main_text = summary
@@ -172,11 +169,11 @@ def render_results(ids, scores, ui_lang="it"):
172
 
173
  <p>{main_text}</p>
174
 
175
- {translate_block}
176
  </div>
177
  """
178
  html += "</div>"
179
- return data
180
 
181
  # --- FUNZIONI DI RICERCA ---
182
 
 
119
 
120
  html = "<div style='font-family: sans-serif;'>"
121
 
 
122
  for row in ordered_books:
123
  score = scores.get(row[0], 0.0)
124
  title, author, year, rating, summary = row[1], row[2], row[3], row[4], row[5]
125
 
126
  # Pulizia
127
  author = str(author).replace('"', '').replace("[","").replace("]", "")
 
 
128
  if not summary: summary = "No summary available."
129
 
130
  main_text = summary
 
169
 
170
  <p>{main_text}</p>
171
 
172
+ /*translate_block*/
173
  </div>
174
  """
175
  html += "</div>"
176
+ return html
177
 
178
  # --- FUNZIONI DI RICERCA ---
179