paulml commited on
Commit
87de7de
·
verified ·
1 Parent(s): 45e871d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -3,6 +3,21 @@ import json
3
  import pandas as pd
4
  import numpy as np
5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  # Load the scores from JSON file
7
  def load_scores():
8
  with open('scores.json', 'r') as f:
 
3
  import pandas as pd
4
  import numpy as np
5
 
6
+ # Function to load and display PNG logo
7
+ def load_png_as_logo():
8
+ try:
9
+ import base64
10
+ with open('racine.png', 'rb') as f:
11
+ png_data = base64.b64encode(f.read()).decode('utf-8')
12
+ # Return an img tag with the logo
13
+ return f'''<img src="data:image/png;base64,{png_data}" style="width: 120px; height: auto;" />'''
14
+ except FileNotFoundError:
15
+ print("Warning: racine.png file not found")
16
+ return "<!-- PNG file not found -->"
17
+ except Exception as e:
18
+ print(f"Error loading PNG: {e}")
19
+ return "<!-- Error loading PNG -->"
20
+
21
  # Load the scores from JSON file
22
  def load_scores():
23
  with open('scores.json', 'r') as f: