Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- server/app.py +6 -2
server/app.py
CHANGED
|
@@ -124,10 +124,14 @@ def run_baseline() -> dict:
|
|
| 124 |
Run the baseline agent on all tasks and return scores.
|
| 125 |
This endpoint triggers the baseline inference script.
|
| 126 |
"""
|
| 127 |
-
import subprocess, sys, json, re
|
| 128 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
result = subprocess.run(
|
| 130 |
-
[sys.executable,
|
| 131 |
capture_output=True, text=True, timeout=120,
|
| 132 |
)
|
| 133 |
|
|
|
|
| 124 |
Run the baseline agent on all tasks and return scores.
|
| 125 |
This endpoint triggers the baseline inference script.
|
| 126 |
"""
|
| 127 |
+
import subprocess, sys, json, re, os
|
| 128 |
try:
|
| 129 |
+
# Get absolute path to the baseline script
|
| 130 |
+
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
| 131 |
+
baseline_script = os.path.join(base_dir, "baseline", "run_baseline.py")
|
| 132 |
+
|
| 133 |
result = subprocess.run(
|
| 134 |
+
[sys.executable, baseline_script, "--output", "json"],
|
| 135 |
capture_output=True, text=True, timeout=120,
|
| 136 |
)
|
| 137 |
|