Spaces:
Running
Running
Update app.py
Browse filesdebug for the files structures.
app.py
CHANGED
|
@@ -24,9 +24,22 @@ models = ['output_path_4o', 'output_path_miniomni', 'output_path_speechgpt', 'ou
|
|
| 24 |
for model in models:
|
| 25 |
elo_rank_system.add_model(model)
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
def load_test_data(task):
|
| 29 |
"""Load the JSON file corresponding to the selected task"""
|
|
|
|
|
|
|
| 30 |
with open(os.path.join(DATA_DIR, f"{task}.json"), "r", encoding='utf-8') as f:
|
| 31 |
test_data = json.load(f)
|
| 32 |
|
|
|
|
| 24 |
for model in models:
|
| 25 |
elo_rank_system.add_model(model)
|
| 26 |
|
| 27 |
+
import os
|
| 28 |
+
|
| 29 |
+
def print_directory_structure(start_path, indent=''):
|
| 30 |
+
for item in os.listdir(start_path):
|
| 31 |
+
item_path = os.path.join(start_path, item)
|
| 32 |
+
if os.path.isdir(item_path):
|
| 33 |
+
print(f"{indent}📁 {item}/")
|
| 34 |
+
print_directory_structure(item_path, indent + ' ')
|
| 35 |
+
else:
|
| 36 |
+
print(f"{indent}📄 {item}")
|
| 37 |
+
|
| 38 |
|
| 39 |
def load_test_data(task):
|
| 40 |
"""Load the JSON file corresponding to the selected task"""
|
| 41 |
+
# 调用函数,打印当前目录结构
|
| 42 |
+
print_directory_structure('.')
|
| 43 |
with open(os.path.join(DATA_DIR, f"{task}.json"), "r", encoding='utf-8') as f:
|
| 44 |
test_data = json.load(f)
|
| 45 |
|