ninooo96 commited on
Commit
6636cee
·
1 Parent(s): e603e7a

fix translation

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -208,8 +208,7 @@ def search_logic(query, max_res, lang_pref):
208
  except Exception as e:
209
  yield gr.update(visible=False), f"Errore: {e}"
210
 
211
- def find_logic(title, lang_pref):
212
- # (Logica simile per ricerca titolo, omettiamo traduzione query qui)
213
  yield gr.update(visible=True), gr.update(visible=False), [], gr.update(visible=False)
214
  conn = get_turso_conn()
215
  rows = conn.execute(f"SELECT id, title, author, year FROM books WHERE title LIKE '{title}%' LIMIT 10").fetchall()
@@ -268,7 +267,7 @@ with gr.Blocks(theme=gr.themes.Ocean(), css=GLOBAL_CSS, js=JS_FORCE_DARK) as dem
268
  loader = gr.HTML(value=LOADING_HTML, visible=False)
269
  results = gr.HTML(label="Risultati", visible=True)
270
 
271
- # EVENTI (Passiamo sempre lang_selector)
272
  btn_search.click(search_logic, [txt_in, num_results, lang_selector], [loader, results])
273
  txt_in.submit(search_logic, [txt_in, num_results, lang_selector], [loader, results])
274
 
 
208
  except Exception as e:
209
  yield gr.update(visible=False), f"Errore: {e}"
210
 
211
+ def find_logic(title):
 
212
  yield gr.update(visible=True), gr.update(visible=False), [], gr.update(visible=False)
213
  conn = get_turso_conn()
214
  rows = conn.execute(f"SELECT id, title, author, year FROM books WHERE title LIKE '{title}%' LIMIT 10").fetchall()
 
267
  loader = gr.HTML(value=LOADING_HTML, visible=False)
268
  results = gr.HTML(label="Risultati", visible=True)
269
 
270
+ # EVENTI
271
  btn_search.click(search_logic, [txt_in, num_results, lang_selector], [loader, results])
272
  txt_in.submit(search_logic, [txt_in, num_results, lang_selector], [loader, results])
273