Spaces:
Running
Running
Commit
Β·
430430b
1
Parent(s):
a77e16d
fix
Browse files
README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
| 2 |
title: Benchmark Finder
|
| 3 |
emoji: π
|
| 4 |
colorFrom: blue
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned:
|
| 10 |
short_description: A space to view and inspect all the tasks in lighteval
|
| 11 |
---
|
| 12 |
|
|
|
|
| 2 |
title: Benchmark Finder
|
| 3 |
emoji: π
|
| 4 |
colorFrom: blue
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.49.1
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
short_description: A space to view and inspect all the tasks in lighteval
|
| 11 |
---
|
| 12 |
|
app.py
CHANGED
|
@@ -18,11 +18,24 @@ import ast
|
|
| 18 |
import os
|
| 19 |
import re
|
| 20 |
from collections import Counter
|
|
|
|
| 21 |
from dataclasses import dataclass
|
| 22 |
|
| 23 |
import gradio as gr
|
| 24 |
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
REPO_ROOT = "."
|
| 27 |
TASK_DIRS = [
|
| 28 |
os.path.join(REPO_ROOT, "lighteval", "src", "lighteval", "tasks", "tasks"),
|
|
@@ -426,19 +439,5 @@ with gr.Blocks(title="Lighteval Tasks Explorer", css=None) as demo:
|
|
| 426 |
cards.value = render_cards(initial_tasks)
|
| 427 |
|
| 428 |
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
git_url = "https://github.com/huggingface/lighteval.git"
|
| 433 |
-
repo_dir = "./lighteval"
|
| 434 |
-
|
| 435 |
-
if os.path.exists(repo_dir) and os.path.isdir(os.path.join(repo_dir, ".git")):
|
| 436 |
-
print(f"Pulling latest changes from {git_url}...")
|
| 437 |
-
repo = Repo(repo_dir)
|
| 438 |
-
repo.remotes.origin.pull()
|
| 439 |
-
else:
|
| 440 |
-
print(f"Cloning {git_url} to {repo_dir}...")
|
| 441 |
-
Repo.clone_from(git_url, repo_dir)
|
| 442 |
-
|
| 443 |
-
# Run with `python benchmark_finder/app.py`
|
| 444 |
-
demo.launch()
|
|
|
|
| 18 |
import os
|
| 19 |
import re
|
| 20 |
from collections import Counter
|
| 21 |
+
from git import Repo # pip install gitpython
|
| 22 |
from dataclasses import dataclass
|
| 23 |
|
| 24 |
import gradio as gr
|
| 25 |
|
| 26 |
|
| 27 |
+
git_url = "https://github.com/huggingface/lighteval.git"
|
| 28 |
+
repo_dir = "./lighteval"
|
| 29 |
+
|
| 30 |
+
if os.path.exists(repo_dir) and os.path.isdir(os.path.join(repo_dir, ".git")):
|
| 31 |
+
print(f"Pulling latest changes from {git_url}...")
|
| 32 |
+
repo = Repo(repo_dir)
|
| 33 |
+
repo.remotes.origin.pull()
|
| 34 |
+
else:
|
| 35 |
+
print(f"Cloning {git_url} to {repo_dir}...")
|
| 36 |
+
Repo.clone_from(git_url, repo_dir)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
REPO_ROOT = "."
|
| 40 |
TASK_DIRS = [
|
| 41 |
os.path.join(REPO_ROOT, "lighteval", "src", "lighteval", "tasks", "tasks"),
|
|
|
|
| 439 |
cards.value = render_cards(initial_tasks)
|
| 440 |
|
| 441 |
|
| 442 |
+
# Run with `python benchmark_finder/app.py`
|
| 443 |
+
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|