albertvillanova HF staff commited on
Commit
4a05739
1 Parent(s): bea7063

Improve async loading performance of Details

Browse files
Files changed (1) hide show
  1. src/details.py +1 -1
src/details.py CHANGED
@@ -50,7 +50,7 @@ def fetch_details_paths(model_id, subtask):
50
  async def load_details_dataframe(model_id, subtask):
51
  if not model_id or not subtask:
52
  return
53
- paths = fetch_details_paths(model_id, subtask)
54
  if not paths:
55
  return
56
  path = max(paths)
 
50
  async def load_details_dataframe(model_id, subtask):
51
  if not model_id or not subtask:
52
  return
53
+ paths = await asyncio.to_thread(fetch_details_paths, model_id, subtask)
54
  if not paths:
55
  return
56
  path = max(paths)