from flask import Flask, render_template import pandas as pd app = Flask(__name__) @app.route('/') def index(): # Load the CSV file into a DataFrame df = pd.read_csv('leaderboard.csv') df = df.round(3) df.insert(0, '#', '') # Convert the DataFrame to HTML table_html = df.to_html(classes='table table-striped table-bordered', index=False) # Render the template with the table HTML return render_template('index.html', table_html=table_html) if __name__ == '__main__': app.run(host='0.0.0.0', port=7860, debug=True)