openreviewer commited on
Commit
fea0b0c
1 Parent(s): b11f9e3

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +15 -13
app.py CHANGED
@@ -8,6 +8,7 @@ from aws_utils import update_leaderboard, get_leaderboard, write_request
8
  from flask import request
9
  import hashlib
10
  import uuid
 
11
 
12
  setup_logging()
13
  paper_dir = 'path_to_temp_storage'
@@ -169,6 +170,7 @@ def setup_interface():
169
 
170
  # Fetch the leaderboard data from the database
171
  leaderboard_data = get_leaderboard()
 
172
 
173
  # Create the leaderboard HTML dynamically
174
  leaderboard_html = """
@@ -188,19 +190,19 @@ def setup_interface():
188
  <tbody>
189
  """
190
 
191
- for rank, model in enumerate(leaderboard_data, start=1):
192
- leaderboard_html += f"""
193
- <tr style="border: 1px solid #444; padding: 12px;">
194
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{rank}</td>
195
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['ModelID']}</td>
196
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['EloScore']}</td>
197
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">+3/-3</td> <!-- Adjust as needed -->
198
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['Votes']}</td>
199
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">Organization</td> <!-- Add actual data if available -->
200
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">License</td> <!-- Add actual data if available -->
201
- <td style="border: 1px solid #444; padding: 12px; color: #ddd;">Knowledge Cutoff</td> <!-- Add actual data if available -->
202
- </tr>
203
- """
204
 
205
  leaderboard_html += """
206
  </tbody>
 
8
  from flask import request
9
  import hashlib
10
  import uuid
11
+ import json
12
 
13
  setup_logging()
14
  paper_dir = 'path_to_temp_storage'
 
170
 
171
  # Fetch the leaderboard data from the database
172
  leaderboard_data = get_leaderboard()
173
+ print(json.dumps(leaderboard_data))
174
 
175
  # Create the leaderboard HTML dynamically
176
  leaderboard_html = """
 
190
  <tbody>
191
  """
192
 
193
+ # for rank, model in enumerate(leaderboard_data, start=1):
194
+ # leaderboard_html += f"""
195
+ # <tr style="border: 1px solid #444; padding: 12px;">
196
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{rank}</td>
197
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['ModelID']}</td>
198
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['EloScore']}</td>
199
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">+3/-3</td> <!-- Adjust as needed -->
200
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">{model['Votes']}</td>
201
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">Organization</td> <!-- Add actual data if available -->
202
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">License</td> <!-- Add actual data if available -->
203
+ # <td style="border: 1px solid #444; padding: 12px; color: #ddd;">Knowledge Cutoff</td> <!-- Add actual data if available -->
204
+ # </tr>
205
+ # """
206
 
207
  leaderboard_html += """
208
  </tbody>