Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,12 +51,22 @@ try:
|
|
| 51 |
)
|
| 52 |
except Exception:
|
| 53 |
restart_space()
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
|
| 62 |
LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
|
|
|
| 51 |
)
|
| 52 |
except Exception:
|
| 53 |
restart_space()
|
| 54 |
+
|
| 55 |
+
eval_result_file = os.path.join(EVAL_RESULTS_PATH, 'llm-jp-13b-v2.0', 'llm-jp--llm-jp-13b-v2.0_vllm_20240908_170440.json')
|
| 56 |
+
|
| 57 |
+
try:
|
| 58 |
+
print(f"Opening file: {eval_result_file}")
|
| 59 |
+
with open(eval_result_file, 'r') as file:
|
| 60 |
+
content = file.read() # 一旦中身を生のテキストとして読み込み
|
| 61 |
+
print(f"File content (raw text): {content}") # 生のテキストを出力
|
| 62 |
+
result_data = json.loads(content) # その後にjsonとしてパース
|
| 63 |
+
print(f"Evaluation result file content (parsed JSON): {result_data}")
|
| 64 |
+
except json.JSONDecodeError as e:
|
| 65 |
+
print(f"Failed to decode JSON: {e}")
|
| 66 |
+
except FileNotFoundError:
|
| 67 |
+
print(f"File not found: {eval_result_file}")
|
| 68 |
+
except Exception as e:
|
| 69 |
+
print(f"An error occurred: {e}")
|
| 70 |
|
| 71 |
|
| 72 |
LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|