julien-c HF staff lhoestq HF staff commited on
Commit
7e36185
β€’
1 Parent(s): ac80b7b

order by score desc (#1)

Browse files

- order by score desc (3dbbc0df1c3ddf7c60c62b571546b3919839db6c)


Co-authored-by: Quentin Lhoest <lhoestq@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def get_parquet_urls(dataset: str) -> List[str]:
28
 
29
  def run_command(query: str) -> pd.DataFrame:
30
  try:
31
- result = duckdb.execute("SELECT fts_main_data.match_bm25(id, ?) AS score, id, instruction, input, output FROM data WHERE score IS NOT NULL ORDER BY score;", [query])
32
  print("Ok")
33
  except Exception as error:
34
  print(f"Error: {str(error)}")
 
28
 
29
  def run_command(query: str) -> pd.DataFrame:
30
  try:
31
+ result = duckdb.execute("SELECT fts_main_data.match_bm25(id, ?) AS score, id, instruction, input, output FROM data WHERE score IS NOT NULL ORDER BY score DESC;", [query])
32
  print("Ok")
33
  except Exception as error:
34
  print(f"Error: {str(error)}")