Cecile Nguyen commited on
Commit
198c409
·
unverified ·
1 Parent(s): 8f044f3

Add favicon and title (#96)

Browse files
Files changed (3) hide show
  1. app.py +2 -2
  2. assets/favicon/favicon.ico +0 -0
  3. ui_components.py +1 -1
app.py CHANGED
@@ -238,10 +238,10 @@ if __name__ == "__main__":
238
  if LOCAL_DEBUG:
239
  print("Launching in LOCAL_DEBUG mode.")
240
  def get_initial_global_tag_choices(): return ["Overall"]
241
- demo.launch(debug=True, allowed_paths=["assets"])
242
  else:
243
  print("Launching in Space mode.")
244
  # For Spaces, share=False is typical unless specific tunneling is needed.
245
  # debug=True can be set to False for a "production" Space.
246
- demo.launch(server_name="0.0.0.0", server_port=7860, debug=True, share=False, allowed_paths=["assets"])
247
 
 
238
  if LOCAL_DEBUG:
239
  print("Launching in LOCAL_DEBUG mode.")
240
  def get_initial_global_tag_choices(): return ["Overall"]
241
+ demo.launch(debug=True, allowed_paths=["assets"], favicon_path="assets/favicon/favicon.ico")
242
  else:
243
  print("Launching in Space mode.")
244
  # For Spaces, share=False is typical unless specific tunneling is needed.
245
  # debug=True can be set to False for a "production" Space.
246
+ demo.launch(server_name="0.0.0.0", server_port=7860, debug=True, share=False, allowed_paths=["assets"], favicon_path="assets/favicon/favicon.ico")
247
 
assets/favicon/favicon.ico ADDED
ui_components.py CHANGED
@@ -549,7 +549,7 @@ def create_leaderboard_display(
549
  # append the repro url to the end of the agent name
550
  if 'Source' in df_view.columns:
551
  df_view['Agent'] = df_view.apply(
552
- lambda row: f"{row['Agent']} {row['Source']}" if row['Source'] else row['Agent'],
553
  axis=1
554
  )
555
 
 
549
  # append the repro url to the end of the agent name
550
  if 'Source' in df_view.columns:
551
  df_view['Agent'] = df_view.apply(
552
+ lambda row: f"{row['Agent']} {row['Source']}" if pd.notna(row['Source']) and row['Source'] else row['Agent'],
553
  axis=1
554
  )
555