Spaces:
Runtime error
Runtime error
felix
commited on
Commit
Β·
84fc6ef
1
Parent(s):
fbb34c2
fix
Browse files
app.py
CHANGED
|
@@ -181,20 +181,20 @@ def display(x, y):
|
|
| 181 |
|
| 182 |
subset_df = original_df[COLS]
|
| 183 |
# Ensure the output directory exists
|
| 184 |
-
output_dir = 'output'
|
| 185 |
-
if not os.path.exists(output_dir):
|
| 186 |
-
|
| 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 |
-
|
| 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
|
| 198 |
|
| 199 |
INTRODUCTION_TEXT = """
|
| 200 |
This is a copied space from Open Source LLM leaderboard. Instead of displaying
|
|
@@ -225,7 +225,7 @@ data = data['data']
|
|
| 225 |
interface = gr.Interface(
|
| 226 |
fn=display,
|
| 227 |
inputs=[gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text"), dummy1],
|
| 228 |
-
outputs=[hidden_leaderboard_table_for_search
|
| 229 |
)
|
| 230 |
|
| 231 |
interface.launch()
|
|
|
|
| 181 |
|
| 182 |
subset_df = original_df[COLS]
|
| 183 |
# Ensure the output directory exists
|
| 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
|
| 198 |
|
| 199 |
INTRODUCTION_TEXT = """
|
| 200 |
This is a copied space from Open Source LLM leaderboard. Instead of displaying
|
|
|
|
| 225 |
interface = gr.Interface(
|
| 226 |
fn=display,
|
| 227 |
inputs=[gr.Markdown(INTRODUCTION_TEXT, elem_classes="markdown-text"), dummy1],
|
| 228 |
+
outputs=[hidden_leaderboard_table_for_search]
|
| 229 |
)
|
| 230 |
|
| 231 |
interface.launch()
|