Spaces:
Runtime error
Runtime error
Terry Zhuo
commited on
Commit
·
9f3c532
1
Parent(s):
23ab980
update
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ def generate_command(
|
|
| 21 |
):
|
| 22 |
command = [default_command]
|
| 23 |
|
| 24 |
-
if jsonl_file is not None:
|
| 25 |
# Copy the uploaded file to the current directory
|
| 26 |
local_filename = os.path.basename(jsonl_file.name)
|
| 27 |
shutil.copy(jsonl_file.name, local_filename)
|
|
@@ -147,7 +147,8 @@ with gr.Blocks() as demo:
|
|
| 147 |
|
| 148 |
def start_evaluation(command, jsonl_file, subset, split):
|
| 149 |
extra = subset + "_" if subset != "full" else ""
|
| 150 |
-
|
|
|
|
| 151 |
|
| 152 |
for log in stream_logs(command, jsonl_file):
|
| 153 |
yield log, gr.update(value=result_path, label=result_path), gr.update()
|
|
|
|
| 21 |
):
|
| 22 |
command = [default_command]
|
| 23 |
|
| 24 |
+
if jsonl_file.name is not None:
|
| 25 |
# Copy the uploaded file to the current directory
|
| 26 |
local_filename = os.path.basename(jsonl_file.name)
|
| 27 |
shutil.copy(jsonl_file.name, local_filename)
|
|
|
|
| 147 |
|
| 148 |
def start_evaluation(command, jsonl_file, subset, split):
|
| 149 |
extra = subset + "_" if subset != "full" else ""
|
| 150 |
+
if jsonl_file.name is not None:
|
| 151 |
+
result_path = os.path.basename(jsonl_file.name).replace(".jsonl", f"_{extra}eval_results.json")
|
| 152 |
|
| 153 |
for log in stream_logs(command, jsonl_file):
|
| 154 |
yield log, gr.update(value=result_path, label=result_path), gr.update()
|