Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,21 @@ import pandas as pd
|
|
| 3 |
from PIL import Image, ImageDraw, ImageFont
|
| 4 |
import io
|
| 5 |
import os, socket
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
from huggingface_hub import hf_hub_download
|
| 7 |
|
| 8 |
HF_REPO_ID = "AIEnergyScore/Leaderboard" # this is a Space
|
|
|
|
| 3 |
from PIL import Image, ImageDraw, ImageFont
|
| 4 |
import io
|
| 5 |
import os, socket
|
| 6 |
+
|
| 7 |
+
# --- CSV mapping (HF Space: AIEnergyScore/Leaderboard -> data/energy) ---
|
| 8 |
+
TASK_TO_CSV = {
|
| 9 |
+
"Image Generation": "image_generation.csv",
|
| 10 |
+
"Text Classification": "text_classification.csv",
|
| 11 |
+
"Image Classification": "image_classification.csv",
|
| 12 |
+
"Image Captioning": "image_captioning.csv",
|
| 13 |
+
"Summarization": "summarization.csv",
|
| 14 |
+
"Text Generation": "text_generation.csv",
|
| 15 |
+
"Reasoning": "reasoning.csv",
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
# Back-compat so old code like task_to_file[task] keeps working
|
| 19 |
+
task_to_file = TASK_TO_CSV
|
| 20 |
+
|
| 21 |
from huggingface_hub import hf_hub_download
|
| 22 |
|
| 23 |
HF_REPO_ID = "AIEnergyScore/Leaderboard" # this is a Space
|