Spaces:
Runtime error
Runtime error
felix
commited on
Commit
Β·
fbb34c2
1
Parent(s):
4f75073
fix
Browse files
app.py
CHANGED
|
@@ -184,17 +184,17 @@ def display(x, y):
|
|
| 184 |
output_dir = 'output'
|
| 185 |
if not os.path.exists(output_dir):
|
| 186 |
os.makedirs(output_dir)
|
| 187 |
-
|
| 188 |
-
|
| 189 |
output_file_path = os.path.join(output_dir, 'output.json')
|
| 190 |
with open(output_file_path, 'w') as file:
|
| 191 |
file.write(subset_df.to_json(orient='records'))
|
| 192 |
|
| 193 |
-
first_50_rows = subset_df.head(50)
|
| 194 |
#print(first_50_rows.to_string())
|
| 195 |
#json_data = first_50_rows.to_json(orient='records')
|
| 196 |
#print(json_data) # Print JSON representation
|
| 197 |
-
return
|
| 198 |
|
| 199 |
INTRODUCTION_TEXT = """
|
| 200 |
This is a copied space from Open Source LLM leaderboard. Instead of displaying
|
|
|
|
| 184 |
output_dir = 'output'
|
| 185 |
if not os.path.exists(output_dir):
|
| 186 |
os.makedirs(output_dir)
|
| 187 |
+
#
|
| 188 |
+
## Save JSON to a file in the output directory
|
| 189 |
output_file_path = os.path.join(output_dir, 'output.json')
|
| 190 |
with open(output_file_path, 'w') as file:
|
| 191 |
file.write(subset_df.to_json(orient='records'))
|
| 192 |
|
| 193 |
+
#first_50_rows = subset_df.head(50)
|
| 194 |
#print(first_50_rows.to_string())
|
| 195 |
#json_data = first_50_rows.to_json(orient='records')
|
| 196 |
#print(json_data) # Print JSON representation
|
| 197 |
+
return subset_df, output_file_path
|
| 198 |
|
| 199 |
INTRODUCTION_TEXT = """
|
| 200 |
This is a copied space from Open Source LLM leaderboard. Instead of displaying
|