File size: 2,082 Bytes
16d37fe
22b961e
 
16d37fe
22b961e
 
 
 
 
 
 
 
16d37fe
22b961e
 
 
16d37fe
22b961e
 
 
16d37fe
22b961e
 
 
16d37fe
22b961e
 
 
16d37fe
22b961e
 
 
16d37fe
 
 
22b961e
 
 
16d37fe
22b961e
 
 
 
 
 
 
 
 
 
 
16d37fe
22b961e
 
16d37fe
22b961e
 
 
 
16d37fe
22b961e
16d37fe
22b961e
 
 
 
 
16d37fe
 
22b961e
 
16d37fe
22b961e
 
 
16d37fe
22b961e
16d37fe
22b961e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import gradio as gr
import plotly.graph_objs as go
import json

# Dummy data - replace with real model benchmarks later
MODEL_EVALS = {
    "Proteins": {
        "Nexa Bio1 (Secondary)": 0.71,
        "Porter6 (Secondary)": 0.8456,
        "DeepCNF (Secondary)": 0.85,
        "AlphaFold2 (Tertiary GDT-TS)": 0.924,
        "Nexa Bio2 (Tertiary)": 0.90,
    },
    "Astro": {
        "Nexa Astro": 0.97,
        "Baseline CNN": 0.89,
    },
    "Materials": {
        "Nexa Materials": 0.9999,
        "Random Forest Baseline": 0.92,
    },
    "QST": {
        "Nexa PIN Model": 0.80,
        "Quantum TomoNet": 0.85,
    },
    "HEP": {
        "Nexa HEP Model": 0.91,
        "CMSNet": 0.94,
    },
    "CFD": {
        "Nexa CFD Model": 0.92,
        "FlowNet": 0.89,
    },
}

def plot_domain(domain):
    models = list(MODEL_EVALS[domain].keys())
    scores = list(MODEL_EVALS[domain].values())

    fig = go.Figure()
    fig.add_trace(go.Bar(x=models, y=scores, marker_color='indigo'))
    fig.update_layout(
        title=f"Model Benchmark Scores β€” {domain}",
        xaxis_title="Model",
        yaxis_title="Score",
        yaxis_range=[0, 1.0],
        template="plotly_white",
        height=500
    )
    return fig

def get_model_details(domain):
    return json.dumps(MODEL_EVALS[domain], indent=2)

def display_eval(domain):
    plot = plot_domain(domain)
    details = get_model_details(domain)
    return plot, details

domain_list = list(MODEL_EVALS.keys())

with gr.Blocks(title="Nexa Evals β€” Scientific ML Benchmark Suite") as demo:
    gr.Markdown("""
    # πŸ”¬ Nexa Evals
    A benchmarking suite comparing Nexa models against SOTA across scientific domains.
    """)

    with gr.Row():
        domain = gr.Dropdown(domain_list, label="Select Domain")
        show_btn = gr.Button("Run Evaluation")

    with gr.Row():
        plot_output = gr.Plot(label="Benchmark Plot")
        metrics_output = gr.Code(label="Raw Scores (JSON)", language="json")

    show_btn.click(display_eval, inputs=domain, outputs=[plot_output, metrics_output])

demo.launch()