""" MUSEval Leaderboard - Local Demo Imports from app.py to ensure identical functionality, loads a local demo leaderboard """ import gradio as gr import pandas as pd import json import os from datetime import datetime from typing import Dict, List, Any import numpy as np # Import from our src package from src.load_results import ( load_results_with_metadata, create_overall_table, get_filter_options, get_model_metadata, create_model_metadata_display, get_overall_summary ) # Import the main interface function from app.py from app import create_leaderboard_interface # Create the demo using the same function as app.py demo = create_leaderboard_interface() # Launch the demo if __name__ == "__main__": print("🎨 MUSEval Leaderboard Local Demo") print("=" * 50) try: print("📊 Loading data...") results = load_results_with_metadata() print(f"✅ Loaded {len(results)} results") print("🏗️ Creating interface...") print("🚀 Starting local leaderboard...") print("📊 Access at: http://localhost:7860") print("🔄 Press Ctrl+C to stop") demo.launch( server_name="0.0.0.0", server_port=7860, share=False, show_error=True, quiet=False ) except Exception as e: print(f"❌ Error: {e}") import traceback traceback.print_exc()