rodrigomasini commited on
Commit
dcc4e10
·
verified ·
1 Parent(s): 5dc37c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -20
app.py CHANGED
@@ -182,27 +182,13 @@ def display(x, y):
182
  leaderboard_df[column] = leaderboard_df[column].apply(remove_invalid_unicode)
183
 
184
  subset_df = leaderboard_df[COLS]
185
- # Ensure the output directory exists
186
- #output_dir = 'output'
187
- #if not os.path.exists(output_dir):
188
- # os.makedirs(output_dir)
189
- #
190
- ## Save JSON to a file in the output directory
191
- #output_file_path = os.path.join(output_dir, 'output.json')
192
- #with open(output_file_path, 'w') as file:
193
- # file.write(subset_df.to_json(orient='records'))
194
-
195
- #first_50_rows = subset_df.head(50)
196
- #print(first_50_rows.to_string())
197
- #json_data = first_50_rows.to_json(orient='records')
198
- #print(json_data) # Print JSON representation
199
  return subset_df
200
 
201
  INTRODUCTION_TEXT = """
202
- This is a copied space from Open Source LLM leaderboard. Instead of displaying
203
- the results as table the space simply provides a gradio API interface to access
204
- the full leaderboard data easily.
205
- Example python on how to access the data:
206
  ```python
207
  # Import dependencies
208
  from gradio_client import Client
@@ -246,8 +232,6 @@ except Exception as e:
246
  print(f"An error occurred: {e}")
247
  ```
248
  """
249
- ```
250
- """
251
 
252
  interface = gr.Interface(
253
  fn=display,
 
182
  leaderboard_df[column] = leaderboard_df[column].apply(remove_invalid_unicode)
183
 
184
  subset_df = leaderboard_df[COLS]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  return subset_df
186
 
187
  INTRODUCTION_TEXT = """
188
+ This is a copied space from Enterprise Scenarios Leaderboard. Instead of displaying
189
+ the results as table this space was modified to simply provides a gradio API interface.
190
+ Using the following python script below, users can access the full leaderboard data easily.
191
+ Python on how to access the data:
192
  ```python
193
  # Import dependencies
194
  from gradio_client import Client
 
232
  print(f"An error occurred: {e}")
233
  ```
234
  """
 
 
235
 
236
  interface = gr.Interface(
237
  fn=display,