Linker1907 commited on
Commit
72e68df
·
1 Parent(s): e8990d2

update finder

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -23,11 +23,11 @@ from dataclasses import asdict, dataclass
23
 
24
  import gradio as gr
25
 
26
- REPO_ROOT = "."
27
- LIGHTEVAL_REPO_ROOT = "/Users/nathan/Repos/lighteval-dev-1"
28
  TASK_DIRS = [
29
- os.path.join(LIGHTEVAL_REPO_ROOT, "src", "lighteval", "tasks", "tasks"),
30
- os.path.join(LIGHTEVAL_REPO_ROOT, "src", "lighteval", "tasks", "multilingual", "tasks"),
31
  ]
32
  # place cache inside repo root to avoid dirname('') issue
33
  CACHE_PATH = "tasks_index.json"
@@ -196,7 +196,6 @@ def build_and_cache_index() -> tuple[list[TaskDoc], list[str], list[str]]:
196
 
197
 
198
  _loaded = load_index(CACHE_PATH)
199
- _loaded = None
200
  if _loaded is None:
201
  print("Building and caching index...")
202
  ALL_TASKS, ALL_LANGS, ALL_TAGS = build_and_cache_index()
 
23
 
24
  import gradio as gr
25
 
26
+
27
+ REPO_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
28
  TASK_DIRS = [
29
+ os.path.join(REPO_ROOT, "src", "lighteval", "tasks", "tasks"),
30
+ os.path.join(REPO_ROOT, "src", "lighteval", "tasks", "multilingual", "tasks"),
31
  ]
32
  # place cache inside repo root to avoid dirname('') issue
33
  CACHE_PATH = "tasks_index.json"
 
196
 
197
 
198
  _loaded = load_index(CACHE_PATH)
 
199
  if _loaded is None:
200
  print("Building and caching index...")
201
  ALL_TASKS, ALL_LANGS, ALL_TAGS = build_and_cache_index()