Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,6 @@ from datasets import load_dataset
|
|
| 6 |
import numpy as np
|
| 7 |
from tqdm import tqdm
|
| 8 |
import json
|
| 9 |
-
import tempfile
|
| 10 |
from huggingface_hub import hf_hub_download, login
|
| 11 |
import os
|
| 12 |
|
|
@@ -284,16 +283,6 @@ def run_comparison(target_model, target_adapter, count):
|
|
| 284 |
print(data)
|
| 285 |
print(output)
|
| 286 |
|
| 287 |
-
# Create a temporary file
|
| 288 |
-
temp_file = tempfile.NamedTemporaryFile(delete=False, suffix=".json")
|
| 289 |
-
|
| 290 |
-
# Save JSON
|
| 291 |
-
with open(temp_file.name, "w", encoding="utf-8") as f:
|
| 292 |
-
json.dump(data, f, indent=2, ensure_ascii=False)
|
| 293 |
-
|
| 294 |
-
if temp_file.name:
|
| 295 |
-
output += f"Download JSON export of evaluation results <a href='{temp_file.name}'>here</a>.\n"
|
| 296 |
-
|
| 297 |
return output
|
| 298 |
|
| 299 |
def get_base_model(adapter_repo):
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
from tqdm import tqdm
|
| 8 |
import json
|
|
|
|
| 9 |
from huggingface_hub import hf_hub_download, login
|
| 10 |
import os
|
| 11 |
|
|
|
|
| 283 |
print(data)
|
| 284 |
print(output)
|
| 285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
return output
|
| 287 |
|
| 288 |
def get_base_model(adapter_repo):
|