lhoestq HF Staff commited on
Commit
f1cea12
·
1 Parent(s): 4b3b034

revert, won't work on spaces

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -299,19 +299,12 @@ with gr.Blocks(css=css) as demo:
299
  }
300
  current_item_idx += 1
301
 
302
- search_js = """
303
- (search_query => {
304
- const urlParams = new URLSearchParams(window.location.search);
305
- urlParams.set('q', search_query);
306
- window.location.search = urlParams;
307
- })
308
- """
309
-
310
- @search_button.click(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state, app_state], js=search_js)
311
  def search_dataset_from_search_button(search_query):
312
  yield from _search_datasets(search_query)
313
 
314
- @search_bar.submit(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state, app_state], js=search_js)
315
  def search_dataset_from_search_bar(search_query):
316
  yield from _search_datasets(search_query)
317
 
 
299
  }
300
  current_item_idx += 1
301
 
302
+
303
+ @search_button.click(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state, app_state])
 
 
 
 
 
 
 
304
  def search_dataset_from_search_button(search_query):
305
  yield from _search_datasets(search_query)
306
 
307
+ @search_bar.submit(inputs=search_bar, outputs=button_groups + buttons + [generated_texts_state, app_state])
308
  def search_dataset_from_search_bar(search_query):
309
  yield from _search_datasets(search_query)
310