gilbertyiga commited on
Commit
1af45d7
·
1 Parent(s): f23a1fc

Update space

Browse files
.gitignore ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ */node_modules
5
+ /.pnp
6
+ .pnp.js
7
+
8
+ # testing
9
+ /coverage
10
+
11
+ # production
12
+ /build
13
+
14
+ # misc
15
+ .DS_Store
16
+ .env.local
17
+ .env.development.local
18
+ .env.test.local
19
+ .env.production.local
20
+
21
+ npm-debug.log*
22
+ yarn-debug.log*
23
+ yarn-error.log*
Dockerfile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+ WORKDIR /app
3
+ COPY requirements.txt .
4
+ RUN pip install -r requirements.txt
5
+ COPY . .
6
+ # Build and serve React
7
+ RUN cd frontend && npm ci && npm run build
8
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
README copy.md ADDED
File without changes
app.py ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI, HTTPException
2
+ from fastapi.middleware.cors import CORSMiddleware
3
+ from pydantic import BaseModel
4
+ import json, os
5
+ from evaluator import evaluate_model
6
+
7
+ app = FastAPI()
8
+ DB_PATH = "models_results.json"
9
+
10
+ # Add CORS Middleware
11
+ app.add_middleware(
12
+ CORSMiddleware,
13
+ allow_origins=["*"],
14
+ allow_credentials=True,
15
+ allow_methods=["*"],
16
+ allow_headers=["*"],
17
+ )
18
+
19
+ class ModelIn(BaseModel):
20
+ model_name: str
21
+
22
+ @app.get("/results")
23
+ def get_results():
24
+ try:
25
+ with open(DB_PATH, "r") as f:
26
+ return json.load(f)
27
+ except (json.JSONDecodeError, FileNotFoundError):
28
+ # Return an empty list if the file is empty or missing
29
+ return []
30
+
31
+ @app.post("/evaluate")
32
+ def eval_and_store(req: ModelIn):
33
+ model_name = req.model_name
34
+ # 1. Check if already evaluated
35
+ data = json.load(open(DB_PATH))
36
+ if any(d["model"] == model_name for d in data):
37
+ raise HTTPException(400, "Model already evaluated")
38
+ # 2. Run evaluation
39
+ try:
40
+ metrics = evaluate_model(
41
+ model_name=model_name, # any 🤗 model ID
42
+ dataset_name="sunbird/salt", # your test split
43
+ split="dev", # or whatever split you’ve prepared
44
+ )
45
+
46
+ except Exception as e:
47
+ raise HTTPException(500, f"Evaluation failed: {e}")
48
+ # 3. Append & save
49
+ data.append({"model": model_name, "metrics": metrics})
50
+ with open(DB_PATH, "w") as f:
51
+ json.dump(data, f, indent=2)
52
+ return {"status": "ok", "metrics": metrics}
53
+
54
+ # Serve React's build folder
55
+ from fastapi.staticfiles import StaticFiles
56
+ app.mount("/", StaticFiles(directory="frontend/build", html=True), name="static")
evaluator.py ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # evaluator.py
2
+
3
+ import numpy as np
4
+ from collections import defaultdict
5
+ from datasets import load_dataset
6
+ from tqdm.auto import tqdm
7
+
8
+ from sacrebleu.metrics import BLEU, CHRF
9
+ from rouge_score import rouge_scorer
10
+ import Levenshtein
11
+
12
+ from transformers import pipeline
13
+ from transformers.models.whisper.english_normalizer import BasicTextNormalizer
14
+
15
+
16
+ def calculate_metrics(reference: str, prediction: str) -> dict:
17
+ """
18
+ Compute a suite of translation / generation metrics:
19
+ - BLEU
20
+ - chrF
21
+ - CER (character error rate)
22
+ - WER (word error rate)
23
+ - length ratio
24
+ - ROUGE-1 & ROUGE-L
25
+ - a combined quality_score
26
+ """
27
+ # BLEU
28
+ bleu = BLEU(effective_order=True)
29
+ bleu_score = bleu.sentence_score(prediction, [reference]).score
30
+
31
+ # chrF
32
+ chrf = CHRF()
33
+ chrf_score = chrf.sentence_score(prediction, [reference]).score / 100.0
34
+
35
+ # Character error rate
36
+ cer = Levenshtein.distance(reference, prediction) / max(len(reference), 1)
37
+
38
+ # Word error rate
39
+ ref_words = reference.split()
40
+ pred_words = prediction.split()
41
+ wer = Levenshtein.distance(ref_words, pred_words) / max(len(ref_words), 1)
42
+
43
+ # Length ratio
44
+ len_ratio = len(prediction) / max(len(reference), 1)
45
+
46
+ # ROUGE
47
+ rouge_scores = {}
48
+ try:
49
+ scorer = rouge_scorer.RougeScorer(["rouge1", "rougeL"], use_stemmer=True)
50
+ rouge_scores = scorer.score(reference, prediction)
51
+ rouge_1 = rouge_scores["rouge1"].fmeasure
52
+ rouge_L = rouge_scores["rougeL"].fmeasure
53
+ except Exception:
54
+ rouge_1 = rouge_L = 0.0
55
+
56
+ # Combined quality
57
+ try:
58
+ quality_score = (
59
+ (bleu_score / 100)
60
+ + chrf_score
61
+ + (1 - cer)
62
+ + (1 - wer)
63
+ + rouge_1
64
+ + rouge_L
65
+ ) / 6
66
+ except Exception:
67
+ quality_score = (
68
+ (bleu_score / 100) + chrf_score + (1 - cer) + (1 - wer)
69
+ ) / 4
70
+
71
+ return {
72
+ "bleu": bleu_score,
73
+ "chrf": chrf_score,
74
+ "cer": cer,
75
+ "wer": wer,
76
+ "len_ratio": len_ratio,
77
+ "rouge1": rouge_1,
78
+ "rougeL": rouge_L,
79
+ "quality_score": quality_score,
80
+ }
81
+
82
+
83
+ def evaluate_model(
84
+ model_name: str,
85
+ dataset_name: str,
86
+ split: str = "test",
87
+ text_field: str = "source",
88
+ target_field: str = "target",
89
+ task: str = "translation", # or "automatic-speech-recognition", etc.
90
+ device: int = 0,
91
+ ) -> dict:
92
+ """
93
+ Load your dataset, run inference via a 🤗 pipeline, and compute metrics
94
+ grouped by language‐pair (if present) plus overall averages.
95
+
96
+ Returns a dict of shape:
97
+ {
98
+ "<src>_to_<tgt>": {<metric1>: val, ...},
99
+ ...,
100
+ "averages": {<metric1>: val, ...}
101
+ }
102
+ """
103
+ # 1) load test split
104
+ ds = load_dataset(dataset_name, split=split)
105
+
106
+ # 2) build pipeline
107
+ nlp = pipeline(task, model=model_name, device=device)
108
+
109
+ # 3) run inference
110
+ normalizer = BasicTextNormalizer()
111
+ translations = []
112
+ for ex in tqdm(ds, desc=f"Eval {model_name}"):
113
+ src = ex[text_field]
114
+ tgt = ex[target_field]
115
+ pred = nlp(src)[0].get("translation_text", nlp(src)[0].get("text", ""))
116
+ translations.append({
117
+ "source": src,
118
+ "target": tgt,
119
+ "prediction": pred,
120
+ # Optional language metadata:
121
+ "source.language": ex.get("source.language", ""),
122
+ "target.language": ex.get("target.language", "")
123
+ })
124
+
125
+ # 4) group by language‐pair
126
+ subsets = defaultdict(list)
127
+ for ex in translations:
128
+ key = (
129
+ f"{ex['source.language']}_to_{ex['target.language']}"
130
+ if ex["source.language"] and ex["target.language"]
131
+ else "default"
132
+ )
133
+ subsets[key].append(ex)
134
+
135
+ # 5) compute metrics per subset
136
+ results = {}
137
+ for subset, examples in subsets.items():
138
+ # collect metrics lists
139
+ agg = defaultdict(list)
140
+ for ex in examples:
141
+ ref = normalizer(ex["target"])
142
+ pred = normalizer(ex["prediction"])
143
+ m = calculate_metrics(ref, pred)
144
+ for k, v in m.items():
145
+ agg[k].append(v)
146
+ # take mean
147
+ results[subset] = {k: float(np.mean(vs)) for k, vs in agg.items()}
148
+
149
+ # 6) overall averages
150
+ all_metrics = list(results.values())
151
+ avg = {}
152
+ for k in all_metrics[0].keys():
153
+ avg[k] = float(np.mean([m[k] for m in all_metrics]))
154
+ results["averages"] = avg
155
+
156
+ return results
157
+
158
+
159
+ if __name__ == "__main__":
160
+ # simple test
161
+ import json
162
+ out = evaluate_model(
163
+ model_name="facebook/wmt19-en-de",
164
+ dataset_name="wmt19",
165
+ split="test",
166
+ )
167
+ print(json.dumps(out, indent=2))
frontend/package.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "sunbird-leaderboard-v1",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "dependencies": {
6
+ "@testing-library/dom": "^10.4.0",
7
+ "@testing-library/jest-dom": "^6.6.3",
8
+ "@testing-library/react": "^16.3.0",
9
+ "@testing-library/user-event": "^13.5.0",
10
+ "@types/jest": "^27.5.2",
11
+ "@types/node": "^16.18.126",
12
+ "@types/react": "^19.1.7",
13
+ "@types/react-dom": "^19.1.6",
14
+ "axios": "^1.9.0",
15
+ "react": "^19.1.0",
16
+ "react-dom": "^19.1.0",
17
+ "react-scripts": "5.0.1",
18
+ "recharts": "^2.15.3",
19
+ "typescript": "^4.9.5",
20
+ "web-vitals": "^2.1.4"
21
+ },
22
+ "scripts": {
23
+ "start": "react-scripts start",
24
+ "build": "react-scripts build",
25
+ "test": "react-scripts test",
26
+ "eject": "react-scripts eject"
27
+ },
28
+ "eslintConfig": {
29
+ "extends": [
30
+ "react-app",
31
+ "react-app/jest"
32
+ ]
33
+ },
34
+ "browserslist": {
35
+ "production": [
36
+ ">0.2%",
37
+ "not dead",
38
+ "not op_mini all"
39
+ ],
40
+ "development": [
41
+ "last 1 chrome version",
42
+ "last 1 firefox version",
43
+ "last 1 safari version"
44
+ ]
45
+ },
46
+ "devDependencies": {
47
+ "@types/axios": "^0.14.4",
48
+ "autoprefixer": "^10.4.21",
49
+ "postcss": "^8.5.4",
50
+ "tailwindcss": "^3.4.17"
51
+ }
52
+ }
frontend/postcss.config.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
frontend/public/favicon.ico ADDED
frontend/public/index.html ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <meta name="theme-color" content="#000000" />
8
+ <meta
9
+ name="description"
10
+ content="Web site created using create-react-app"
11
+ />
12
+ <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
+ <!--
14
+ manifest.json provides metadata used when your web app is installed on a
15
+ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
+ -->
17
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
+ <!--
19
+ Notice the use of %PUBLIC_URL% in the tags above.
20
+ It will be replaced with the URL of the `public` folder during the build.
21
+ Only files inside the `public` folder can be referenced from the HTML.
22
+
23
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
+ work correctly both with client-side routing and a non-root public URL.
25
+ Learn how to configure a non-root public URL by running `npm run build`.
26
+ -->
27
+ <title>React App</title>
28
+ </head>
29
+ <body>
30
+ <noscript>You need to enable JavaScript to run this app.</noscript>
31
+ <div id="root"></div>
32
+ <!--
33
+ This HTML file is a template.
34
+ If you open it directly in the browser, you will see an empty page.
35
+
36
+ You can add webfonts, meta tags, or analytics to this file.
37
+ The build step will place the bundled scripts into the <body> tag.
38
+
39
+ To begin the development, run `npm start` or `yarn start`.
40
+ To create a production bundle, use `npm run build` or `yarn build`.
41
+ -->
42
+ </body>
43
+ </html>
frontend/public/logo192.png ADDED
frontend/public/logo512.png ADDED
frontend/public/manifest.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "short_name": "React App",
3
+ "name": "Create React App Sample",
4
+ "icons": [
5
+ {
6
+ "src": "favicon.ico",
7
+ "sizes": "64x64 32x32 24x24 16x16",
8
+ "type": "image/x-icon"
9
+ },
10
+ {
11
+ "src": "logo192.png",
12
+ "type": "image/png",
13
+ "sizes": "192x192"
14
+ },
15
+ {
16
+ "src": "logo512.png",
17
+ "type": "image/png",
18
+ "sizes": "512x512"
19
+ }
20
+ ],
21
+ "start_url": ".",
22
+ "display": "standalone",
23
+ "theme_color": "#000000",
24
+ "background_color": "#ffffff"
25
+ }
frontend/public/robots.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # https://www.robotstxt.org/robotstxt.html
2
+ User-agent: *
3
+ Disallow:
frontend/requirements.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn
3
+ pydantic
4
+
5
+ # Core dependencies
6
+ datasets>=2.14.0
7
+ sacrebleu>=2.3.0
8
+ rouge-score>=0.1.2
9
+ Levenshtein>=0.21.0
10
+ numpy>=1.24.0
11
+ pandas>=2.0.0
12
+ matplotlib>=3.7.0
13
+ huggingface_hub>=0.16.0
14
+ PyYAML>=6.0
15
+ plotly>=5.0.0
16
+ google-cloud-translate>=3.0.0
17
+ ipython
18
+
19
+ # Additional dependencies that SALT might need
20
+ transformers>=4.30.0
21
+ torch>=2.0.0
frontend/src/App.tsx ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { useState, useMemo } from 'react';
2
+ import { useResults } from './hooks/useResults';
3
+ import ModelSelector from './components/ModelSelector';
4
+ import MetricCard from './components/MetricCard';
5
+ import BarChartView from './components/BarChartView';
6
+ import RadarView from './components/RadarView';
7
+ import LineTrendView from './components/LineTrendView';
8
+ import ComparisonTable from './components/ComparisonTable';
9
+ import AddModelForm from './components/AddModelForm';
10
+ import { ChartRow, ModelMetrics } from './types';
11
+
12
+ const colors = ['#4F46E5', '#059669', '#DC2626', '#7C3AED', '#EA580C', '#0891B2'];
13
+ const metrics = ['bleu','chrf','cer','wer','rouge1','rouge2','rougeL','quality_score'];
14
+
15
+ function App() {
16
+ const { data, error } = useResults();
17
+ const [selectedMetric, setSelectedMetric] = useState(metrics[0]);
18
+ const [selectedModel, setSelectedModel] = useState('');
19
+ const [selectedModels, setSelectedModels] = useState<string[]>([]);
20
+ const [comparisonMode, setComparisonMode] = useState(false);
21
+ const [viewMode, setViewMode] = useState<'overview' | 'detailed'>('overview');
22
+ const [activeTab, setActiveTab] = useState<'dashboard' | 'addModel' | 'comparison'>('dashboard');
23
+ const [newModelName, setNewModelName] = useState('');
24
+ const [isEvaluating, setIsEvaluating] = useState(false);
25
+
26
+ const modelNames = data ? Object.keys(data) : [];
27
+ const languagePairs = data && selectedModel && data[selectedModel]
28
+ ? Object.keys(data[selectedModel]).filter(k => k !== 'averages')
29
+ : [];
30
+ const barChartData: ChartRow[] = useMemo(() => {
31
+ if (!data || !selectedModel || !data[selectedModel]) return [];
32
+ return languagePairs.map(pair => {
33
+ const row: any = { name: pair.toUpperCase() };
34
+ if (comparisonMode) {
35
+ selectedModels.forEach((m, i) => {
36
+ row[m] = data[m]?.[pair]?.[selectedMetric as keyof ModelMetrics] ?? 0;
37
+ });
38
+ } else {
39
+ row[selectedMetric] = data[selectedModel]?.[pair]?.[selectedMetric as keyof ModelMetrics] ?? 0;
40
+ }
41
+ return row;
42
+ });
43
+ }, [data, languagePairs, selectedMetric, comparisonMode, selectedModels]);
44
+
45
+ const radarData: ChartRow[] = useMemo(() => {
46
+ if (!data || !selectedModel || !data[selectedModel]) return [];
47
+ return metrics.map(metric => {
48
+ const point: any = { metric: metric.toUpperCase() };
49
+ if (comparisonMode) {
50
+ selectedModels.forEach((m, i) => {
51
+ point[m] = data[m]?.averages?.[metric as keyof ModelMetrics] ?? 0;
52
+ });
53
+ } else {
54
+ point.value = data[selectedModel]?.averages?.[metric as keyof ModelMetrics] ?? 0;
55
+ }
56
+ return point;
57
+ });
58
+ }, [data, selectedModel, selectedModels, comparisonMode]);
59
+
60
+ if (error) return <div className="p-6 text-red-600">Error: {error}</div>;
61
+ if (!data) return <div className="p-6">Loading...</div>;
62
+
63
+ return (
64
+ <div className="min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
65
+ {/* Main Navigation Tabs */}
66
+ <div className="bg-white shadow-sm border-b">
67
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
68
+ <div className="flex justify-between items-center py-6">
69
+ <h1 className="text-3xl font-bold text-gray-900">Translation Leaderboard</h1>
70
+ <div className="flex space-x-4">
71
+ <button
72
+ onClick={() => setActiveTab('dashboard')}
73
+ className={`px-4 py-2 rounded-lg font-medium ${
74
+ activeTab === 'dashboard' ? 'bg-indigo-600 text-white' : 'bg-gray-200 text-gray-700 hover:bg-gray-300'
75
+ }`}
76
+ >
77
+ Dashboard
78
+ </button>
79
+ <button
80
+ onClick={() => setActiveTab('comparison')}
81
+ className={`px-4 py-2 rounded-lg font-medium ${
82
+ activeTab === 'comparison' ? 'bg-indigo-600 text-white' : 'bg-gray-200 text-gray-700 hover:bg-gray-300'
83
+ }`}
84
+ >
85
+ Comparison
86
+ </button>
87
+ <button
88
+ onClick={() => setActiveTab('addModel')}
89
+ className={`px-4 py-2 rounded-lg font-medium ${
90
+ activeTab === 'addModel' ? 'bg-indigo-600 text-white' : 'bg-gray-200 text-gray-700 hover:bg-gray-300'
91
+ }`}
92
+ >
93
+ Add Model
94
+ </button>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ {/* Content Based on Active Tab */}
101
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
102
+ {activeTab === 'dashboard' && (
103
+ <div>
104
+ <h2 className="text-2xl font-bold mb-4">Dashboard</h2>
105
+ {/* Toggle Button for Comparison Mode */}
106
+ <div className="mb-6">
107
+ <button
108
+ onClick={() => setComparisonMode(!comparisonMode)}
109
+ className={`px-4 py-2 rounded-lg font-medium ${
110
+ comparisonMode ? 'bg-red-600 text-white' : 'bg-indigo-600 text-white'
111
+ }`}
112
+ >
113
+ {comparisonMode ? 'Disable Comparison Mode' : 'Enable Comparison Mode'}
114
+ </button>
115
+ </div>
116
+
117
+ <ModelSelector
118
+ modelNames={modelNames}
119
+ selectedModel={selectedModel}
120
+ selectedModels={selectedModels}
121
+ comparisonMode={comparisonMode}
122
+ onSelectModel={setSelectedModel}
123
+ onToggleModel={m =>
124
+ setSelectedModels(prev =>
125
+ prev.includes(m) ? prev.filter(x => x !== m) : [...prev, m]
126
+ )
127
+ }
128
+ />
129
+
130
+ <div className="grid grid-cols-1 lg:grid-cols-4 gap-6 mb-8">
131
+ {/* Summary cards */}
132
+ {!comparisonMode ? (
133
+ <>
134
+ {data[selectedModel]?.averages && (
135
+ <MetricCard
136
+ title="Average BLEU"
137
+ value={data[selectedModel].averages.bleu}
138
+ description="Translation quality"
139
+ colorHex={colors[0]}
140
+ />
141
+ )}
142
+ {/* Other cards */}
143
+ </>
144
+ ) : (
145
+ selectedModels.map((m, i) => (
146
+ data[m]?.averages && (
147
+ <MetricCard
148
+ key={m}
149
+ title="Avg BLEU"
150
+ value={data[m].averages.bleu}
151
+ description={m}
152
+ colorHex={colors[i]}
153
+ />
154
+ )
155
+ ))
156
+ )}
157
+ </div>
158
+
159
+ {viewMode === 'overview' ? (
160
+ <>
161
+
162
+ <ComparisonTable data={data} metrics={metrics} />
163
+ <BarChartView
164
+ data={barChartData}
165
+ metrics={metrics}
166
+ selectedMetric={selectedMetric}
167
+ onMetricChange={setSelectedMetric}
168
+ comparisonMode={comparisonMode}
169
+ colors={colors}
170
+ selectedModels={selectedModels}
171
+ />
172
+
173
+ </>
174
+ ) : (
175
+ <>
176
+ <RadarView data={radarData} comparisonMode={comparisonMode} colors={colors} />
177
+ <LineTrendView data={barChartData} selectedModels={selectedModels} comparisonMode={comparisonMode} colors={colors} />
178
+ </>
179
+ )}
180
+ </div>
181
+ )}
182
+ {activeTab === 'addModel' && (
183
+ <div>
184
+ <h2 className="text-2xl font-bold mb-4">Add a New Model</h2>
185
+ <AddModelForm
186
+ newModelName={newModelName}
187
+ isEvaluating={isEvaluating}
188
+ onNameChange={setNewModelName}
189
+ onEvaluate={() => {
190
+ // Add evaluation logic here
191
+ }}
192
+ />
193
+ </div>
194
+ )}
195
+ {activeTab === 'comparison' && (
196
+ <div>
197
+ <h2 className="text-2xl font-bold mb-4">Comparison</h2>
198
+ <ModelSelector
199
+ modelNames={modelNames}
200
+ selectedModel={selectedModel}
201
+ selectedModels={selectedModels}
202
+ comparisonMode={comparisonMode}
203
+ onSelectModel={setSelectedModel}
204
+ onToggleModel={m =>
205
+ setSelectedModels(prev =>
206
+ prev.includes(m) ? prev.filter(x => x !== m) : [...prev, m]
207
+ )
208
+ }
209
+ />
210
+ <RadarView data={radarData} comparisonMode={comparisonMode} colors={colors} />
211
+ <ComparisonTable data={data} metrics={metrics} />
212
+ <LineTrendView data={barChartData} selectedModels={selectedModels} comparisonMode={comparisonMode} colors={colors} />
213
+ </div>
214
+ )}
215
+ </div>
216
+ </div>
217
+ );
218
+ }
219
+
220
+ export default App;
frontend/src/api/translation.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from 'axios';
2
+ import { ModelData, ModelMetrics } from '../types';
3
+
4
+ const api = axios.create({
5
+ baseURL: process.env.REACT_APP_API_URL,
6
+ timeout: 10000,
7
+ });
8
+
9
+ export interface ApiResult {
10
+ model: string;
11
+ metrics: ModelData;
12
+ }
13
+
14
+ export const fetchResults = () => api.get<ApiResult[]>('/results');
15
+ export const evaluateModel = (model_name: string) => api.post<{ metrics: ModelMetrics }>('/evaluate', { model_name });
frontend/src/components/AddModelForm.tsx ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+
3
+ interface Props {
4
+ newModelName: string;
5
+ isEvaluating: boolean;
6
+ onNameChange: (value: string) => void;
7
+ onEvaluate: () => void;
8
+ }
9
+
10
+ const AddModelForm: FC<Props> = ({ newModelName, isEvaluating, onNameChange, onEvaluate }) => (
11
+ <div className="bg-white rounded-xl shadow-lg p-6">
12
+ <h2 className="text-2xl font-bold text-gray-800 mb-6">Add a New Model</h2>
13
+ <div className="space-y-4">
14
+ <input
15
+ type="text"
16
+ value={newModelName}
17
+ onChange={e => onNameChange(e.target.value)}
18
+ placeholder="Enter model name (e.g., facebook/wmt19-en-de)"
19
+ className="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500"
20
+ />
21
+ <button
22
+ onClick={onEvaluate}
23
+ disabled={isEvaluating}
24
+ className={`px-4 py-2 rounded-lg font-medium text-white ${
25
+ isEvaluating ? 'bg-gray-400' : 'bg-indigo-600 hover:bg-indigo-700'
26
+ }`}
27
+ >
28
+ {isEvaluating ? 'Evaluating...' : 'Evaluate Model'}
29
+ </button>
30
+ </div>
31
+ </div>
32
+ );
33
+
34
+ export default AddModelForm;
frontend/src/components/App.css ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .App {
2
+ text-align: center;
3
+ }
4
+
5
+ .App-logo {
6
+ height: 40vmin;
7
+ pointer-events: none;
8
+ }
9
+
10
+ @media (prefers-reduced-motion: no-preference) {
11
+ .App-logo {
12
+ animation: App-logo-spin infinite 20s linear;
13
+ }
14
+ }
15
+
16
+ .App-header {
17
+ background-color: #282c34;
18
+ min-height: 100vh;
19
+ display: flex;
20
+ flex-direction: column;
21
+ align-items: center;
22
+ justify-content: center;
23
+ font-size: calc(10px + 2vmin);
24
+ color: white;
25
+ }
26
+
27
+ .App-link {
28
+ color: #61dafb;
29
+ }
30
+
31
+ @keyframes App-logo-spin {
32
+ from {
33
+ transform: rotate(0deg);
34
+ }
35
+ to {
36
+ transform: rotate(360deg);
37
+ }
38
+ }
frontend/src/components/App.test.tsx ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { render, screen } from '@testing-library/react';
3
+ import TranslationDashboard from '../App';
4
+
5
+ test('renders evaluation results heading', () => {
6
+ render(<TranslationDashboard />);
7
+ const headingElement = screen.getByText(/evaluation results/i);
8
+ expect(headingElement).toBeInTheDocument();
9
+ });
frontend/src/components/BarChartView.tsx ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+ import {
3
+ ResponsiveContainer,
4
+ BarChart,
5
+ CartesianGrid,
6
+ XAxis,
7
+ YAxis,
8
+ Tooltip,
9
+ Legend,
10
+ Bar,
11
+ } from 'recharts';
12
+ import { ChartRow } from '../types';
13
+
14
+ interface Props {
15
+ data: ChartRow[];
16
+ metrics: string[];
17
+ selectedMetric: string;
18
+ onMetricChange: (metric: string) => void;
19
+ comparisonMode: boolean;
20
+ colors: string[];
21
+ selectedModels: string[];
22
+ }
23
+
24
+ const BarChartView: FC<Props> = ({
25
+ data,
26
+ metrics,
27
+ selectedMetric,
28
+ onMetricChange,
29
+ comparisonMode,
30
+ colors,
31
+ selectedModels,
32
+ }) => (
33
+ <div className="bg-white rounded-xl shadow-lg p-6 mb-8">
34
+ <div className="flex justify-between items-center mb-6">
35
+ <h2 className="text-2xl font-bold text-gray-800">
36
+ {comparisonMode ? 'Model Comparison' : 'Performance by Language Pair'}
37
+ </h2>
38
+ <select
39
+ value={selectedMetric}
40
+ onChange={e => onMetricChange(e.target.value)}
41
+ className="px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500"
42
+ >
43
+ {metrics.map(metric => (
44
+ <option key={metric} value={metric}>
45
+ {metric.toUpperCase()}
46
+ </option>
47
+ ))}
48
+ </select>
49
+ </div>
50
+
51
+ <ResponsiveContainer width="100%" height={400}>
52
+ <BarChart data={data}>
53
+ <CartesianGrid strokeDasharray="3 3" />
54
+ <XAxis dataKey="name" angle={-45} textAnchor="end" height={100} />
55
+ <YAxis />
56
+ <Tooltip />
57
+ <Legend />
58
+ {comparisonMode
59
+ ? selectedModels.map((model, i) => (
60
+ <Bar key={model} dataKey={model} fill={colors[i % colors.length]} radius={4} />
61
+ ))
62
+ : <Bar dataKey={selectedMetric} fill={colors[0]} radius={4} />}
63
+ </BarChart>
64
+ </ResponsiveContainer>
65
+ </div>
66
+ );
67
+
68
+ export default BarChartView;
frontend/src/components/ComparisonTable.tsx ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+ import { AllModelsData } from '../types';
3
+
4
+ interface Props {
5
+ data: AllModelsData;
6
+ metrics: string[];
7
+ }
8
+
9
+ const ComparisonTable: FC<Props> = ({ data, metrics }) => {
10
+ const models = Object.keys(data);
11
+
12
+ return (
13
+ <div className="bg-white rounded-xl shadow-lg p-6 overflow-x-auto">
14
+ <h2 className="text-2xl font-bold text-gray-800 mb-6">Model Comparison Table</h2>
15
+ <table className="w-full text-sm">
16
+ <thead>
17
+ <tr className="border-b border-gray-200">
18
+ <th className="text-left py-3 px-4 font-semibold">Model</th>
19
+ {metrics.map(m => (
20
+ <th key={m} className="text-center py-3 px-4 font-semibold">{m.toUpperCase()}</th>
21
+ ))}
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ {models.map(model => (
26
+ <tr key={model} className="border-b border-gray-100 hover:bg-gray-50">
27
+ <td className="py-3 px-4 font-medium">{model}</td>
28
+ {metrics.map(metric => (
29
+ <td key={metric} className="text-center py-3 px-4">
30
+ {data[model].averages[metric as keyof typeof data[string]['averages']].toFixed(3)}
31
+ </td>
32
+ ))}
33
+ </tr>
34
+ ))}
35
+ </tbody>
36
+ </table>
37
+ </div>
38
+ );
39
+ };
40
+
41
+ export default ComparisonTable;
frontend/src/components/LineTrendView.tsx ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+ import { ResponsiveContainer, LineChart, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Line } from 'recharts';
3
+ import { ChartRow } from '../types';
4
+
5
+ interface Props {
6
+ data: ChartRow[];
7
+ selectedModels: string[];
8
+ comparisonMode: boolean;
9
+ colors: string[];
10
+ }
11
+
12
+ const LineTrendView: FC<Props> = ({ data, selectedModels, comparisonMode, colors }) => (
13
+ <div className="bg-white rounded-xl shadow-lg p-6 mb-8">
14
+ <h2 className="text-2xl font-bold text-gray-800 mb-6">Performance Trends</h2>
15
+ <ResponsiveContainer width="100%" height={400}>
16
+ <LineChart data={data}>
17
+ <CartesianGrid strokeDasharray="3 3" />
18
+ <XAxis dataKey="name" />
19
+ <YAxis />
20
+ <Tooltip />
21
+ <Legend />
22
+ {comparisonMode
23
+ ? selectedModels.map((model, index) => (
24
+ <Line
25
+ key={model}
26
+ type="monotone"
27
+ dataKey={model}
28
+ stroke={colors[index % colors.length]} // Cycle through colors
29
+ strokeWidth={3}
30
+ name={model} // Display model name in the legend
31
+ />
32
+ ))
33
+ : (
34
+ <>
35
+ <Line type="monotone" dataKey="bleu" stroke="#4F46E5" strokeWidth={3} />
36
+ <Line type="monotone" dataKey="quality_score" stroke="#059669" strokeWidth={3} />
37
+ </>
38
+ )}
39
+ </LineChart>
40
+ </ResponsiveContainer>
41
+ </div>
42
+ );
43
+
44
+ export default LineTrendView;
frontend/src/components/MetricCard.tsx ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+
3
+ interface Props {
4
+ title: string;
5
+ value: number | string;
6
+ description: string;
7
+ colorHex: string;
8
+ subtitle?: string;
9
+ }
10
+
11
+ const MetricCard: FC<Props> = ({ title, value, description, colorHex, subtitle }) => (
12
+ <div
13
+ className="bg-white rounded-xl shadow-lg p-6 transition-shadow hover:shadow-xl"
14
+ style={{ borderLeft: `4px solid ${colorHex}` }}
15
+ >
16
+ <h3 className="text-lg font-semibold text-gray-800 mb-1">{title}</h3>
17
+ {subtitle && <p className="text-xs text-gray-500 mb-2">{subtitle}</p>}
18
+ <div className="text-3xl font-bold mb-2">{typeof value === 'number' ? value.toFixed(3) : value}</div>
19
+ <p className="text-sm text-gray-600">{description}</p>
20
+ </div>
21
+ );
22
+
23
+ export default MetricCard;
frontend/src/components/ModelSelector.tsx ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { FC } from 'react';
3
+
4
+ interface Props {
5
+ modelNames: string[];
6
+ selectedModel: string;
7
+ selectedModels: string[];
8
+ comparisonMode: boolean;
9
+ onSelectModel: (model: string) => void;
10
+ onToggleModel: (model: string) => void;
11
+ }
12
+
13
+ const ModelSelector: FC<Props> = ({
14
+ modelNames,
15
+ selectedModel,
16
+ selectedModels,
17
+ comparisonMode,
18
+ onSelectModel,
19
+ onToggleModel,
20
+ }) => (
21
+ <div className="bg-white rounded-lg shadow p-4 border">
22
+ <h3 className="font-semibold text-gray-800 mb-3">
23
+ {comparisonMode ? 'Select Models to Compare' : 'Select Model'}
24
+ </h3>
25
+
26
+ {comparisonMode ? (
27
+ <div className="space-y-2">
28
+ {modelNames.map(model => (
29
+ <label key={model} className="flex items-center space-x-2">
30
+ <input
31
+ type="checkbox"
32
+ checked={selectedModels.includes(model)}
33
+ onChange={() => onToggleModel(model)}
34
+ className="rounded border-gray-300 text-indigo-600 focus:ring-indigo-500"
35
+ />
36
+ <span className="text-sm text-gray-700">{model}</span>
37
+ </label>
38
+ ))}
39
+ </div>
40
+ ) : (
41
+ <select
42
+ value={selectedModel}
43
+ onChange={e => onSelectModel(e.target.value)}
44
+ className="w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500"
45
+ >
46
+ {modelNames.map(model => (
47
+ <option key={model} value={model}>
48
+ {model}
49
+ </option>
50
+ ))}
51
+ </select>
52
+ )}
53
+ </div>
54
+ );
55
+
56
+ export default ModelSelector;
frontend/src/components/RadarView.tsx ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React, { FC } from 'react';
2
+ import {
3
+ ResponsiveContainer,
4
+ RadarChart,
5
+ PolarGrid,
6
+ PolarAngleAxis,
7
+ PolarRadiusAxis,
8
+ Radar,
9
+ Legend,
10
+ } from 'recharts';
11
+ import { ChartRow } from '../types';
12
+
13
+ interface Props {
14
+ data: ChartRow[];
15
+ comparisonMode: boolean;
16
+ colors: string[];
17
+ }
18
+
19
+ const RadarView: FC<Props> = ({ data, comparisonMode, colors }) => (
20
+ <div className="bg-white rounded-xl shadow-lg p-6 mb-8">
21
+ <h2 className="text-2xl font-bold text-gray-800 mb-6">
22
+ {comparisonMode ? 'Multi-Model Radar' : 'Metric Distribution'}
23
+ </h2>
24
+ <ResponsiveContainer width="100%" height={400}>
25
+ <RadarChart data={data}>
26
+ <PolarGrid />
27
+ <PolarAngleAxis dataKey="metric" />
28
+ <PolarRadiusAxis angle={90} domain={[0, 1]} />
29
+ {comparisonMode
30
+ ? data[0] /* assume all rows have same keys */ &&
31
+ Object.keys(data[0])
32
+ .filter(k => k !== 'metric')
33
+ .map((key, i) => (
34
+ <Radar
35
+ key={key}
36
+ name={key}
37
+ dataKey={key}
38
+ stroke={colors[i % colors.length]}
39
+ fill={colors[i % colors.length]}
40
+ fillOpacity={0.3}
41
+ />
42
+ ))
43
+ : <Radar name="Performance" dataKey="value" stroke={colors[0]} fill={colors[0]} fillOpacity={0.3} />}
44
+ <Legend />
45
+ </RadarChart>
46
+ </ResponsiveContainer>
47
+ </div>
48
+ );
49
+
50
+ export default RadarView;
frontend/src/hooks/useChartData.ts ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useMemo } from 'react';
2
+ import { ChartRow, AllModelsData, ModelMetrics } from '../types';
3
+
4
+ export function useChartData(
5
+ data: AllModelsData | null,
6
+ selectedModel: string,
7
+ selectedModels: string[],
8
+ selectedMetric: string,
9
+ comparisonMode: boolean,
10
+ metrics: string[]
11
+ ) {
12
+ const barChartData: ChartRow[] = useMemo(() => {
13
+ if (!data || (!selectedModel && selectedModels.length === 0)) return [];
14
+ const languagePairs = selectedModel && data[selectedModel]
15
+ ? Object.keys(data[selectedModel]).filter(k => k !== 'averages')
16
+ : [];
17
+ return languagePairs.map(pair => {
18
+ const row: any = { name: pair.toUpperCase() };
19
+ if (comparisonMode) {
20
+ selectedModels.forEach(model => {
21
+ row[model] = data[model]?.[pair]?.[selectedMetric as keyof ModelMetrics] ?? 0;
22
+ });
23
+ } else {
24
+ row[selectedMetric] = data[selectedModel]?.[pair]?.[selectedMetric as keyof ModelMetrics] ?? 0;
25
+ }
26
+ return row;
27
+ });
28
+ }, [data, selectedModel, selectedModels, selectedMetric, comparisonMode]);
29
+
30
+ const radarData: ChartRow[] = useMemo(() => {
31
+ if (!data || (!selectedModel && selectedModels.length === 0)) return [];
32
+ return metrics.map(metric => {
33
+ const point: any = { metric: metric.toUpperCase() };
34
+ if (comparisonMode) {
35
+ selectedModels.forEach(model => {
36
+ point[model] = data[model]?.averages?.[metric as keyof ModelMetrics] ?? 0;
37
+ });
38
+ } else {
39
+ point.value = data[selectedModel]?.averages?.[metric as keyof ModelMetrics] ?? 0;
40
+ }
41
+ return point;
42
+ });
43
+ }, [data, selectedModel, selectedModels, comparisonMode]);
44
+
45
+ return { barChartData, radarData };
46
+ }
frontend/src/hooks/useResults.ts ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { useState, useEffect } from 'react';
2
+ import axios from 'axios';
3
+ import { AllModelsData, ModelMetrics } from '../types';
4
+
5
+ export function useResults() {
6
+ const [data, setData] = useState<AllModelsData | null>(null);
7
+ const [error, setError] = useState<string | null>(null);
8
+
9
+ useEffect(() => {
10
+ axios
11
+ .get<{ model: string; metrics: AllModelsData[string] }[]>('http://localhost:8000/results')
12
+ .then(res => {
13
+ const transformed: AllModelsData = {};
14
+ res.data.forEach(item => {
15
+ transformed[item.model] = item.metrics;
16
+ });
17
+ setData(transformed);
18
+ })
19
+ .catch(err => {
20
+ console.error(err);
21
+ setError(err.message);
22
+ });
23
+ }, []);
24
+
25
+ return { data, error };
26
+ }
frontend/src/index.css ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
frontend/src/index.tsx ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import './index.css';
4
+ import App from './App';
5
+ import reportWebVitals from './reportWebVitals';
6
+
7
+ const root = ReactDOM.createRoot(
8
+ document.getElementById('root') as HTMLElement
9
+ );
10
+ root.render(
11
+ <React.StrictMode>
12
+ <App />
13
+ </React.StrictMode>
14
+ );
15
+
16
+ // If you want to start measuring performance in your app, pass a function
17
+ // to log results (for example: reportWebVitals(console.log))
18
+ // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
19
+ reportWebVitals();
frontend/src/logo.svg ADDED
frontend/src/react-app-env.d.ts ADDED
@@ -0,0 +1 @@
 
 
1
+ /// <reference types="react-scripts" />
frontend/src/reportWebVitals.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { ReportHandler } from 'web-vitals';
2
+
3
+ const reportWebVitals = (onPerfEntry?: ReportHandler) => {
4
+ if (onPerfEntry && onPerfEntry instanceof Function) {
5
+ import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
6
+ getCLS(onPerfEntry);
7
+ getFID(onPerfEntry);
8
+ getFCP(onPerfEntry);
9
+ getLCP(onPerfEntry);
10
+ getTTFB(onPerfEntry);
11
+ });
12
+ }
13
+ };
14
+
15
+ export default reportWebVitals;
frontend/src/setupTests.ts ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ // jest-dom adds custom jest matchers for asserting on DOM nodes.
2
+ // allows you to do things like:
3
+ // expect(element).toHaveTextContent(/react/i)
4
+ // learn more: https://github.com/testing-library/jest-dom
5
+ import '@testing-library/jest-dom';
frontend/src/types.ts ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export interface ModelMetrics {
2
+ bleu: number;
3
+ chrf: number;
4
+ cer: number;
5
+ wer: number;
6
+ len_ratio: number;
7
+ rouge1: number;
8
+ rouge2: number;
9
+ rougeL: number;
10
+ quality_score: number;
11
+ }
12
+
13
+ export interface ModelData {
14
+ [pair: string]: ModelMetrics;
15
+ averages: ModelMetrics;
16
+ }
17
+
18
+ export interface AllModelsData {
19
+ [model: string]: ModelData;
20
+ }
21
+
22
+ // For bar/radar chart rows:
23
+ export interface ChartRow {
24
+ name: string;
25
+ [key: string]: number | string;
26
+ }
27
+ // API types
28
+ export interface ApiResult {
29
+ model: string;
30
+ metrics: ModelData;
31
+ }
frontend/tailwind.config.js ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ module.exports = {
2
+ content: [
3
+ "./src/**/*.{js,jsx,ts,tsx}",
4
+ ],
5
+ theme: {
6
+ extend: {},
7
+ },
8
+ plugins: [],
9
+ }
frontend/tsconfig.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": [
5
+ "dom",
6
+ "dom.iterable",
7
+ "esnext"
8
+ ],
9
+ "allowJs": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "strict": true,
14
+ "forceConsistentCasingInFileNames": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+ "module": "esnext",
17
+ "moduleResolution": "node",
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noEmit": true,
21
+ "jsx": "react-jsx"
22
+ },
23
+ "include": [
24
+ "src"
25
+ ]
26
+ }
index.html DELETED
@@ -1,19 +0,0 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
models_results.json ADDED
@@ -0,0 +1,692 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "model": "sunbird-qwen3-14b",
4
+ "metrics": {
5
+ "ach_to_eng": {"bleu": 29.893676951301053, "chrf": 0.533224041738049, "cer": 0.43550659508514755, "wer": 0.5722814047840733, "len_ratio": 0.9910228026082467, "rouge1": 0.6013037471425201, "rouge2": 0.37721216654425455, "rougeL": 0.5810190084999007, "quality_score": 0.45609320284545973}, "lgg_to_eng": {"bleu": 28.599782594820592, "chrf": 0.5066369217667385, "cer": 0.4605144560053802, "wer": 0.6027958508390197, "len_ratio": 0.993760271647737, "rouge1": 0.5712775529284185, "rouge2": 0.35528047833025683, "rougeL": 0.5498622681671385, "quality_score": 0.43233111021763604}, "lug_to_eng": {"bleu": 42.967284520037744, "chrf": 0.651902433792848, "cer": 0.31620633974304335, "wer": 0.41791775685573124, "len_ratio": 0.984599994739042, "rouge1": 0.7187322596678193, "rouge2": 0.5173399529343762, "rougeL": 0.6987033563469739, "quality_score": 0.5868627955986127}, "nyn_to_eng": {"bleu": 32.67985629646372, "chrf": 0.5555573573119897, "cer": 0.3996226614650576, "wer": 0.5226613071726924, "len_ratio": 0.9744107912589968, "rouge1": 0.6315633927145826, "rouge2": 0.4089197940759449, "rougeL": 0.6113888753094371, "quality_score": 0.4900179879097192}, "teo_to_eng": {"bleu": 32.52172348369896, "chrf": 0.5575641337333308, "cer": 0.3884327697644638, "wer": 0.5033956827288778, "len_ratio": 0.9628715760526139, "rouge1": 0.641517230418375, "rouge2": 0.40838418032033685, "rougeL": 0.6214971732967394, "quality_score": 0.4977382290192447}, "eng_to_ach": {"bleu": 21.477941285172513, "chrf": 0.5138962223965714, "cer": 0.45657951265182434, "wer": 0.6755567100553327, "len_ratio": 1.014999517783312, "rouge1": 0.5099384983089625, "rouge2": 0.2756919890353192, "rougeL": 0.4908058982934093, "quality_score": 0.3991348531352849}, "eng_to_lgg": {"bleu": 22.041535601523726, "chrf": 0.5255108356738902, "cer": 0.4422267716935427, "wer": 0.6713858470124049, "len_ratio": 1.0313949027800307, "rouge1": 0.5456449443461951, "rouge2": 0.29382498850599353, "rougeL": 0.5186337898829078, "quality_score": 0.4080783932457949}, "eng_to_lug": {"bleu": 33.34672372451176, "chrf": 0.6633356427761459, "cer": 0.3311583312643587, "wer": 0.5238451497835392, "len_ratio": 1.018582055891005, "rouge1": 0.594388873187116, "rouge2": 0.3909919061294654, "rougeL": 0.5833949344122611, "quality_score": 0.5354498497433413}, "eng_to_nyn": {"bleu": 20.79200082458506, "chrf": 0.5729842003065381, "cer": 0.4113873068671208, "wer": 0.7081659294479503, "len_ratio": 1.0317490539724605, "rouge1": 0.44584438768284473, "rouge2": 0.23085276156139556, "rougeL": 0.4373444327375021, "quality_score": 0.4153377430593293}, "eng_to_teo": {"bleu": 23.725735344718192, "chrf": 0.5832096756543237, "cer": 0.4151187089479109, "wer": 0.6281833981430756, "len_ratio": 1.0613714854829055, "rouge1": 0.5195866229204313, "rouge2": 0.2696033999485182, "rougeL": 0.5075491305820932, "quality_score": 0.4442912305026298}, "eng_to_xog": {"bleu": 19.052981317638974, "chrf": 0.5580375571166009, "cer": 0.40660034808436624, "wer": 0.7315224980651331, "len_ratio": 1.0173192546265903, "rouge1": 0.4091926881564407, "rouge2": 0.20611967973474055, "rougeL": 0.404450321174341, "quality_score": 0.4026111310358727}, "eng_to_ttj": {"bleu": 25.074282455874666, "chrf": 0.5852471141018765, "cer": 0.39029555071580396, "wer": 0.6357081997632875, "len_ratio": 1.0276635889601655, "rouge1": 0.5029403203567027, "rouge2": 0.2783539093458642, "rougeL": 0.49312154442651684, "quality_score": 0.4524965470453829}, "eng_to_swa": {"bleu": 39.69206979218379, "chrf": 0.6857228225417764, "cer": 0.2964009389587315, "wer": 0.44971614127360093, "len_ratio": 1.0368448616477834, "rouge1": 0.6679250784200024, "rouge2": 0.4586999764112653, "rougeL": 0.6501414308327976, "quality_score": 0.5841316100578205}, "xog_to_eng": {"bleu": 32.92079591468753, "chrf": 0.5641617154528973, "cer": 0.3839540332720533, "wer": 0.505736384076339, "len_ratio": 0.9812665218521085, "rouge1": 0.6347508404269397, "rouge2": 0.40558927069321776, "rougeL": 0.6153655184656368, "quality_score": 0.500919814312845}, "ttj_to_eng": {"bleu": 35.08945968981431, "chrf": 0.5805360317055387, "cer": 0.37665824404943016, "wer": 0.4906126467618403, "len_ratio": 0.9951291908976828, "rouge1": 0.6509396367141043, "rouge2": 0.4360350381677252, "rougeL": 0.6347547806711414, "quality_score": 0.5160399344481028}, "swa_to_eng": {"bleu": 50.16010559961865, "chrf": 0.7101907099077821, "cer": 0.2658771336442633, "wer": 0.34246272699338404, "len_ratio": 0.9955021465731141, "rouge1": 0.7722154807714764, "rouge2": 0.5929997953476355, "rougeL": 0.7507740512693895, "quality_score": 0.6508629763165803}, "averages": {"bleu": 30.627247212290705, "chrf": 0.5842323384985562, "cer": 0.3860337313882811, "wer": 0.5613717271097676, "len_ratio": 1.0074055010483622, "rouge1": 0.5886100971351833, "rouge2": 0.3691187054428943, "rougeL": 0.5718004071480116, "quality_score": 0.4857748380308536}
6
+ }
7
+ },
8
+ {
9
+ "model": "gemma3-12b-ug40-finetuned",
10
+ "metrics": {"ach_to_eng": {"bleu": 25.11343271537592, "chrf": 0.4860191096457906, "cer": 0.4919295839030974, "wer": 0.643734534592279, "len_ratio": 1.0185021553794027, "rouge1": 0.5453478666173251, "rouge2": 0.3219416367958648, "rougeL": 0.524201216600647, "quality_score": 0.4003723295760434}, "lgg_to_eng": {"bleu": 17.35989959394786, "chrf": 0.3823398395888027, "cer": 0.6124222119859948, "wer": 0.8087767040373183, "len_ratio": 1.0551986682184085, "rouge1": 0.42633247714564226, "rouge2": 0.21809698694179738, "rougeL": 0.4060260521116608, "quality_score": 0.28368497987624197}, "lug_to_eng": {"bleu": 42.232492087846246, "chrf": 0.6425304188010127, "cer": 0.3335844217448657, "wer": 0.4378951249177767, "len_ratio": 1.008934820854824, "rouge1": 0.709432583146364, "rouge2": 0.5082340939744272, "rougeL": 0.6885539307028894, "quality_score": 0.5733439482542082}, "nyn_to_eng": {"bleu": 30.115971927325734, "chrf": 0.5350728867290394, "cer": 0.4255044812312245, "wer": 0.5636166276139, "len_ratio": 0.9995168163572387, "rouge1": 0.6028021381729067, "rouge2": 0.37768861729512687, "rougeL": 0.5853351457264178, "quality_score": 0.46177787428929307}, "teo_to_eng": {"bleu": 24.037351297544017, "chrf": 0.45660558476003665, "cer": 0.5098903559206144, "wer": 0.66326355063606, "len_ratio": 0.9985761779984209, "rouge1": 0.5206918519328798, "rouge2": 0.29757616257393443, "rougeL": 0.5021832815420268, "quality_score": 0.3809562977947005}, "eng_to_ach": {"bleu": 20.47850981787588, "chrf": 0.4998713900635348, "cer": 0.47950490809041924, "wer": 0.7058893060410796, "len_ratio": 1.0279259102426281, "rouge1": 0.4902823147331087, "rouge2": 0.25925552603239826, "rougeL": 0.4679119847922154, "quality_score": 0.37981556852769865}, "eng_to_lgg": {"bleu": 17.83156114658944, "chrf": 0.46520083701043174, "cer": 0.4912480231430983, "wer": 0.7392954137185076, "len_ratio": 1.0040222298037509, "rouge1": 0.48840266808931887, "rouge2": 0.23540163659116345, "rougeL": 0.45623556066324406, "quality_score": 0.35324325290368}, "eng_to_lug": {"bleu": 33.43335290856702, "chrf": 0.6598198822203196, "cer": 0.33288328156255204, "wer": 0.5329261749016848, "len_ratio": 1.0094849062874582, "rouge1": 0.5835755441747735, "rouge2": 0.3827292025413401, "rougeL": 0.5705318574418908, "quality_score": 0.5320859887104382}, "eng_to_nyn": {"bleu": 20.453009142973894, "chrf": 0.5763114515815105, "cer": 0.4080085434691386, "wer": 0.716071038748043, "len_ratio": 1.0417752592674183, "rouge1": 0.4448377559581382, "rouge2": 0.23074255915311173, "rougeL": 0.4351352726668042, "quality_score": 0.414190490198517}, "eng_to_teo": {"bleu": 15.181372127364465, "chrf": 0.479353539228751, "cer": 0.5271113273653261, "wer": 0.7710563350180285, "len_ratio": 1.0958653890262315, "rouge1": 0.40069312378418936, "rouge2": 0.16245608626469754, "rougeL": 0.3908865294077067, "quality_score": 0.3332498995297602}, "eng_to_xog": {"bleu": 18.00596638730871, "chrf": 0.5602175250880231, "cer": 0.39365418624687826, "wer": 0.7346561014952262, "len_ratio": 1.0058363343518926, "rouge1": 0.40309294840310217, "rouge2": 0.18976438719982427, "rougeL": 0.3994074933834067, "quality_score": 0.40299172530475147}, "eng_to_ttj": {"bleu": 24.194664202368145, "chrf": 0.5846369573344875, "cer": 0.39016597970822153, "wer": 0.6401561135535874, "len_ratio": 1.0400234685658434, "rouge1": 0.498559883972833, "rouge2": 0.2813157789083976, "rougeL": 0.4917265006605738, "quality_score": 0.44906537652408995}, "eng_to_swa": {"bleu": 41.67384265910873, "chrf": 0.7019457855280522, "cer": 0.2782188772468657, "wer": 0.42973919281882994, "len_ratio": 1.0325931933120764, "rouge1": 0.685004046162508, "rouge2": 0.47945380227202167, "rougeL": 0.6685093313734645, "quality_score": 0.602681535513361}, "xog_to_eng": {"bleu": 31.64182918312035, "chrf": 0.5473019381440146, "cer": 0.41652585936991027, "wer": 0.5484119855739875, "len_ratio": 1.0155235985633817, "rouge1": 0.6111501202558264, "rouge2": 0.39285189252038694, "rougeL": 0.5933993447258348, "quality_score": 0.47469559625783003}, "ttj_to_eng": {"bleu": 32.74391571294384, "chrf": 0.5556380643120021, "cer": 0.4101941071815267, "wer": 0.5273829309526653, "len_ratio": 1.0036714161713904, "rouge1": 0.625759138731389, "rouge2": 0.4105928718220594, "rougeL": 0.6063340412306235, "quality_score": 0.4863750458268121}, "swa_to_eng": {"bleu": 50.955998739852376, "chrf": 0.7158260766811865, "cer": 0.26964382035693063, "wer": 0.3495457397467596, "len_ratio": 1.0008416855012967, "rouge1": 0.7748498866347656, "rouge2": 0.6015766637293783, "rougeL": 0.7523897235101366, "quality_score": 0.651549125994005}, "averages": {"bleu": 27.84082310313204, "chrf": 0.5530432054198122, "cer": 0.42315562303291654, "wer": 0.6132760546478583, "len_ratio": 1.0223932518688539, "rouge1": 0.5506758967446919, "rouge2": 0.33435486903849565, "rougeL": 0.5336729541587214, "quality_score": 0.44875493969258945}}
11
+ },
12
+ {
13
+ "model": "gemma3-12b-ug40-4bit-quant",
14
+ "metrics": {
15
+ "ach_to_eng": {"bleu": 21.4729661767832, "chrf": 0.4496170371887275, "cer": 0.5238795607867115, "wer": 0.692243685907704, "len_ratio": 1.018348476894355, "rouge1": 0.5100621121441622, "rouge2": 0.27372829947661637, "rougeL": 0.4834319801574132, "quality_score": 0.4069529240939532},
16
+ "eng_to_ach": {"bleu": 16.755438759921113, "chrf": 0.45049534441941974, "cer": 0.5047185301603307, "wer": 0.750613578745915, "len_ratio": 1.0025117482194446, "rouge1": 0.44928898857391764, "rouge2": 0.20580828504350887, "rougeL": 0.4240278320420148, "quality_score": 0.37267240728805295},
17
+ "eng_to_lgg": {"bleu": 11.372746822604652, "chrf": 0.38289951588574617, "cer": 0.5554623220058079, "wer": 0.8196450255123651, "len_ratio": 0.9712294534625859, "rouge1": 0.41354305633464233, "rouge2": 0.14649272731672833, "rougeL": 0.37386728859619445, "quality_score": 0.3181549969207428},
18
+ "eng_to_lug": {"bleu": 28.20637559502546, "chrf": 0.6107608799825299, "cer": 0.37180416584750836, "wer": 0.5942818446509742, "len_ratio": 0.9940918695885228, "rouge1": 0.5275739121053499, "rouge2": 0.3188053758650654, "rougeL": 0.5171273982496929, "quality_score": 0.49523998929822416},
19
+ "eng_to_nyn": {"bleu": 16.46101610966186, "chrf": 0.5212641413986153, "cer": 0.44556935303939627, "wer": 0.7716569355296822, "len_ratio": 1.0176176678547262, "rouge1": 0.37173469650282137, "rouge2": 0.17480324623615434, "rougeL": 0.3664355608287682, "quality_score": 0.36780304520962415},
20
+ "eng_to_swa": {"bleu": 34.85728965804992, "chrf": 0.6499064988711744, "cer": 0.3297420048189144, "wer": 0.5063806405288259, "len_ratio": 1.029950766846105, "rouge1": 0.6253343132217276, "rouge2": 0.40672985153760854, "rougeL": 0.6061543296531952, "quality_score": 0.5656408988298093},
21
+ "eng_to_teo": {"bleu": 11.354552915082225, "chrf": 0.402601395639914, "cer": 0.6073847218781454, "wer": 0.8619104853479853, "len_ratio": 1.099810248113919, "rouge1": 0.3180487615247001, "rouge2": 0.1012222991617374, "rougeL": 0.30968691127823866, "quality_score": 0.2790978983945907},
22
+ "eng_to_xog": {"bleu": 13.420917205099988, "chrf": 0.47240345656926297, "cer": 0.47981592249872757, "wer": 0.8396892979924883, "len_ratio": 0.9877543086333478, "rouge1": 0.31545315902740895, "rouge2": 0.1220769340901552, "rougeL": 0.3104015097062153, "quality_score": 0.31882701281044523},
23
+ "eng_to_ttj": {"bleu": 16.6586798464968, "chrf": 0.4924984720191624, "cer": 0.4651276291420016, "wer": 0.7390441626684511, "len_ratio": 1.0057924851499562, "rouge1": 0.3914667140120163, "rouge2": 0.18006144771016327, "rougeL": 0.3837100328352088, "quality_score": 0.37168170425348385},
24
+ "lgg_to_eng": {"bleu": 12.32879786323486, "chrf": 0.32304500757031107, "cer": 0.6692679994119266, "wer": 0.8894077306509114, "len_ratio": 1.0439009054067556, "rouge1": 0.3534898071043344, "rouge2": 0.14202989318604603, "rougeL": 0.3298602152858462, "quality_score": 0.26183454642166704},
25
+ "lug_to_eng": {"bleu": 35.43782379684757, "chrf": 0.5922238429388922, "cer": 0.3718068923554593, "wer": 0.49748382892802956, "len_ratio": 0.9979934266656314, "rouge1": 0.6630293401277573, "rouge2": 0.4376760575795662, "rougeL": 0.6392055338551386, "quality_score": 0.5632577056011291},
26
+ "nyn_to_eng": {"bleu": 25.458480625652598, "chrf": 0.4935261786667742, "cer": 0.465419847908852, "wer": 0.6148711123435389, "len_ratio": 0.9928662300788028, "rouge1": 0.5617648939792661, "rouge2": 0.3231354511610384, "rougeL": 0.5397584704699726, "quality_score": 0.4615572315200247},
27
+ "swa_to_eng": {"bleu": 45.97432783545669, "chrf": 0.6819820391180372, "cer": 0.2948660062951407, "wer": 0.38266810573202886, "len_ratio": 0.9828458021701164, "rouge1": 0.749023406365157, "rouge2": 0.5544504543659836, "rougeL": 0.7239889314062833, "quality_score": 0.6562005905361457},
28
+ "teo_to_eng": {"bleu": 21.467843556940434, "chrf": 0.42011352105186406, "cer": 0.5229556961814095, "wer": 0.6779863734397059, "len_ratio": 0.9673047055582993, "rouge1": 0.4840116546397648, "rouge2": 0.2623107223216375, "rougeL": 0.46544708326233714, "quality_score": 0.39721810415037584},
29
+ "xog_to_eng": {"bleu": 27.81044272440912, "chrf": 0.5090752251373535, "cer": 0.45288341394763143, "wer": 0.5932568600885726, "len_ratio": 1.013664683393617, "rouge1": 0.5793597662559643, "rouge2": 0.3449307726259345, "rougeL": 0.557485596610377, "quality_score": 0.47964745686859694},
30
+ "ttj_to_eng": {"bleu": 28.212033880217582, "chrf": 0.5094574222853848, "cer": 0.4521726047019253, "wer": 0.5807696044665328, "len_ratio": 1.0020228756514913, "rouge1": 0.5869979083097827, "rouge2": 0.3523762869779724, "rougeL": 0.565152165886336, "quality_score": 0.48513093768587023},
31
+ "averages": {"bleu": 22.953108335717754, "chrf": 0.4976168736714481, "cer": 0.469554791936243, "wer": 0.675744329533357, "len_ratio": 1.0079816033554798, "rouge1": 0.4937614056392984, "rouge2": 0.2716648815409948, "rougeL": 0.47473380250770203, "quality_score": 0.425057340617671}
32
+ }
33
+ },
34
+ {
35
+ "model": "gemma3-12b-ug40-8bit-quant",
36
+ "metrics": {
37
+ "ach_to_eng": {
38
+ "bleu": 21.33575717169921,
39
+ "chrf": 0.4521391134216422,
40
+ "cer": 0.535683670140994,
41
+ "wer": 0.6932714020311863,
42
+ "len_ratio": 1.0410301289165254,
43
+ "rouge1": 0.5115414491119932,
44
+ "rouge2": 0.27254126665296446,
45
+ "rougeL": 0.48705074413604205,
46
+ "quality_score": 0.4058556343690815
47
+ },
48
+ "eng_to_ach": {
49
+ "bleu": 18.325087064280495,
50
+ "chrf": 0.46169074747519706,
51
+ "cer": 0.4941741708398276,
52
+ "wer": 0.7217611122764125,
53
+ "len_ratio": 0.9971235291743883,
54
+ "rouge1": 0.46584238349869556,
55
+ "rouge2": 0.2258632422094869,
56
+ "rougeL": 0.44201558713229405,
57
+ "quality_score": 0.38947738427212525
58
+ },
59
+ "eng_to_lgg": {
60
+ "bleu": 12.228082821292523,
61
+ "chrf": 0.39641379386899284,
62
+ "cer": 0.5550914581438494,
63
+ "wer": 0.8135853738008421,
64
+ "len_ratio": 0.9794736747100792,
65
+ "rouge1": 0.4187206079316151,
66
+ "rouge2": 0.15996623543184668,
67
+ "rougeL": 0.3778975282179714,
68
+ "quality_score": 0.32443932104780215
69
+ },
70
+ "eng_to_lug": {
71
+ "bleu": 30.37021808778844,
72
+ "chrf": 0.6211092235369094,
73
+ "cer": 0.35714076059236627,
74
+ "wer": 0.5696828314000989,
75
+ "len_ratio": 0.9887628479880637,
76
+ "rouge1": 0.5452875907310831,
77
+ "rouge2": 0.3383485068722653,
78
+ "rougeL": 0.5342018761481492,
79
+ "quality_score": 0.5129128798835935
80
+ },
81
+ "eng_to_nyn": {
82
+ "bleu": 16.753648581098513,
83
+ "chrf": 0.5207287514239932,
84
+ "cer": 0.4477157022948351,
85
+ "wer": 0.760699794289097,
86
+ "len_ratio": 1.0078976964397806,
87
+ "rouge1": 0.379103813152116,
88
+ "rouge2": 0.17556542630328617,
89
+ "rougeL": 0.3699470659508593,
90
+ "quality_score": 0.3714834366256703
91
+ },
92
+ "eng_to_swa": {
93
+ "bleu": 34.83533816994912,
94
+ "chrf": 0.6518458171430364,
95
+ "cer": 0.3227943798839051,
96
+ "wer": 0.4978481783673316,
97
+ "len_ratio": 1.0294131193000886,
98
+ "rouge1": 0.6266599273479803,
99
+ "rouge2": 0.4069100776121281,
100
+ "rougeL": 0.608825177720382,
101
+ "quality_score": 0.5691736242766088
102
+ },
103
+ "eng_to_teo": {
104
+ "bleu": 12.392234885652412,
105
+ "chrf": 0.41860468355251723,
106
+ "cer": 0.5878420812904283,
107
+ "wer": 0.837512772845434,
108
+ "len_ratio": 1.0941596008068062,
109
+ "rouge1": 0.33186565537665563,
110
+ "rouge2": 0.11363308176316347,
111
+ "rougeL": 0.32559460177919164,
112
+ "quality_score": 0.29577207257150434
113
+ },
114
+ "eng_to_xog": {
115
+ "bleu": 14.28594219428805,
116
+ "chrf": 0.47824531819630023,
117
+ "cer": 0.4676545238436661,
118
+ "wer": 0.8189706573141702,
119
+ "len_ratio": 0.9789787119512641,
120
+ "rouge1": 0.33227716126053725,
121
+ "rouge2": 0.13497189149879513,
122
+ "rougeL": 0.326945127050312,
123
+ "quality_score": 0.33228364121536563
124
+ },
125
+ "eng_to_ttj": {
126
+ "bleu": 16.977426123943793,
127
+ "chrf": 0.5062896646495704,
128
+ "cer": 0.45395455428659626,
129
+ "wer": 0.7376647417651925,
130
+ "len_ratio": 1.0141849421370215,
131
+ "rouge1": 0.40228568836268996,
132
+ "rouge2": 0.18366644216416722,
133
+ "rougeL": 0.3952386421085991,
134
+ "quality_score": 0.3803281600514181
135
+ },
136
+ "lgg_to_eng": {
137
+ "bleu": 13.05283144643632,
138
+ "chrf": 0.335016264891506,
139
+ "cer": 0.6654538032435573,
140
+ "wer": 0.8799084421534612,
141
+ "len_ratio": 1.0497308112523163,
142
+ "rouge1": 0.37215842505873253,
143
+ "rouge2": 0.1542578202610299,
144
+ "rougeL": 0.3473680834269667,
145
+ "quality_score": 0.27328480707409164
146
+ },
147
+ "lug_to_eng": {
148
+ "bleu": 36.583076178754155,
149
+ "chrf": 0.6017208109828538,
150
+ "cer": 0.36385226407849075,
151
+ "wer": 0.484647564050434,
152
+ "len_ratio": 0.9978253893530138,
153
+ "rouge1": 0.6728986531388527,
154
+ "rouge2": 0.4559711476443575,
155
+ "rougeL": 0.6505567106388979,
156
+ "quality_score": 0.5737511847365369
157
+ },
158
+ "nyn_to_eng": {
159
+ "bleu": 26.848257026479924,
160
+ "chrf": 0.5051204239753181,
161
+ "cer": 0.4435338778359474,
162
+ "wer": 0.5892439429574747,
163
+ "len_ratio": 0.9871168616493217,
164
+ "rouge1": 0.5803117102981369,
165
+ "rouge2": 0.3447149380176738,
166
+ "rougeL": 0.5590397941749801,
167
+ "quality_score": 0.48002944631996874
168
+ },
169
+ "swa_to_eng": {
170
+ "bleu": 45.52723000555685,
171
+ "chrf": 0.6828039855678282,
172
+ "cer": 0.2957147126793479,
173
+ "wer": 0.39049986652868535,
174
+ "len_ratio": 0.9924394318831312,
175
+ "rouge1": 0.7467246988156893,
176
+ "rouge2": 0.5515762032887349,
177
+ "rougeL": 0.7221916920080675,
178
+ "quality_score": 0.65346301620652
179
+ },
180
+ "teo_to_eng": {
181
+ "bleu": 21.732084138527295,
182
+ "chrf": 0.4272565301302563,
183
+ "cer": 0.5181106210940541,
184
+ "wer": 0.6761849143371914,
185
+ "len_ratio": 0.972982533475168,
186
+ "rouge1": 0.494799806539735,
187
+ "rouge2": 0.26288018196280777,
188
+ "rougeL": 0.4724533317550662,
189
+ "quality_score": 0.4029224957298474
190
+ },
191
+ "xog_to_eng": {
192
+ "bleu": 27.988289616284757,
193
+ "chrf": 0.519525535777184,
194
+ "cer": 0.4407529453981863,
195
+ "wer": 0.5811313064307607,
196
+ "len_ratio": 1.0139387986353932,
197
+ "rouge1": 0.5901160493494182,
198
+ "rouge2": 0.35013145494136566,
199
+ "rougeL": 0.5670982618287617,
200
+ "quality_score": 0.489123081881544
201
+ },
202
+ "ttj_to_eng": {
203
+ "bleu": 29.1930717978176,
204
+ "chrf": 0.5209701082464389,
205
+ "cer": 0.43713321847400566,
206
+ "wer": 0.5686012915110401,
207
+ "len_ratio": 1.0027713236347304,
208
+ "rouge1": 0.5960520197834103,
209
+ "rouge2": 0.36925917628754246,
210
+ "rougeL": 0.5760260495288388,
211
+ "quality_score": 0.49654073092530304
212
+ },
213
+ "averages": {
214
+ "bleu": 23.65178595686559,
215
+ "chrf": 0.5062175483024716,
216
+ "cer": 0.4616626715075036,
217
+ "wer": 0.6638258870036758,
218
+ "len_ratio": 1.0092393375816933,
219
+ "rouge1": 0.5041653524848339,
220
+ "rouge2": 0.281266068306976,
221
+ "rougeL": 0.4851531421003362,
222
+ "quality_score": 0.43442755732418636
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "model": "sunbird-nllb-1.3B",
228
+ "metrics": {
229
+ "ach_to_eng": {
230
+ "bleu": 29.430510281424944,
231
+ "chrf": 0.5441419020578823,
232
+ "cer": 0.43772136644658854,
233
+ "wer": 0.570230453613696,
234
+ "len_ratio": 0.9863286651712698,
235
+ "rouge1": 0.6052849080398074,
236
+ "rouge2": 0.3729925619001821,
237
+ "rougeL": 0.5838502087408626,
238
+ "quality_score": 0.5032717169320862
239
+ },
240
+ "eng_to_ach": {
241
+ "bleu": 23.782057976721013,
242
+ "chrf": 0.5198248176762581,
243
+ "cer": 0.454300473673888,
244
+ "wer": 0.6639762120076788,
245
+ "len_ratio": 1.0114108506939241,
246
+ "rouge1": 0.5226163876274231,
247
+ "rouge2": 0.2982056716258377,
248
+ "rougeL": 0.5017633903903476,
249
+ "quality_score": 0.4439580816299454
250
+ },
251
+ "eng_to_lgg": {
252
+ "bleu": 22.609242121260998,
253
+ "chrf": 0.5234007657796004,
254
+ "cer": 0.45175606592292505,
255
+ "wer": 0.6747794509984192,
256
+ "len_ratio": 1.0403123630210043,
257
+ "rouge1": 0.5492432550958023,
258
+ "rouge2": 0.3001400162864386,
259
+ "rougeL": 0.5196794791945015,
260
+ "quality_score": 0.448646734060195
261
+ },
262
+ "eng_to_lug": {
263
+ "bleu": 33.517060557747875,
264
+ "chrf": 0.6557565322551971,
265
+ "cer": 0.3256815714888277,
266
+ "wer": 0.5278019119426852,
267
+ "len_ratio": 0.9943903120813362,
268
+ "rouge1": 0.5901211551364539,
269
+ "rouge2": 0.3819067325679575,
270
+ "rougeL": 0.5786059729778025,
271
+ "quality_score": 0.5510284637525699
272
+ },
273
+ "eng_to_nyn": {
274
+ "bleu": 21.38030939374281,
275
+ "chrf": 0.5862355598811484,
276
+ "cer": 0.3984049224473253,
277
+ "wer": 0.6959072903495935,
278
+ "len_ratio": 1.0294915242689973,
279
+ "rouge1": 0.4535905308368584,
280
+ "rouge2": 0.23655530882283077,
281
+ "rougeL": 0.44567847821809525,
282
+ "quality_score": 0.4341659083461019
283
+ },
284
+ "eng_to_swa": {
285
+ "bleu": 15.317398647865414,
286
+ "chrf": 0.4167348639564299,
287
+ "cer": 0.5758950441995268,
288
+ "wer": 0.8588143291520308,
289
+ "len_ratio": 1.0330167886210408,
290
+ "rouge1": 0.36496818660943187,
291
+ "rouge2": 0.15257733997586892,
292
+ "rougeL": 0.3554022037063463,
293
+ "quality_score": 0.30926164456655075
294
+ },
295
+ "eng_to_teo": {
296
+ "bleu": 23.731299517809013,
297
+ "chrf": 0.588741893126223,
298
+ "cer": 0.39940433066892045,
299
+ "wer": 0.6260653996541092,
300
+ "len_ratio": 1.0459884106635844,
301
+ "rouge1": 0.5248329530752708,
302
+ "rouge2": 0.2766148391060161,
303
+ "rougeL": 0.5092298278756372,
304
+ "quality_score": 0.47244132315536524
305
+ },
306
+ "eng_to_xog": {
307
+ "bleu": 0.25183476787032366,
308
+ "chrf": 0.042723304533363766,
309
+ "cer": 1.0138308923833361,
310
+ "wer": 1.3016492691895918,
311
+ "len_ratio": 0.5627238532432384,
312
+ "rouge1": 0.008552965479925106,
313
+ "rouge2": 0.0012702351412028831,
314
+ "rougeL": 0.008552965479925106,
315
+ "quality_score": -0.04218876306683509
316
+ },
317
+ "eng_to_ttj": {
318
+ "bleu": 0.9434417256850681,
319
+ "chrf": 0.12551153238120175,
320
+ "cer": 1.130481537826477,
321
+ "wer": 2.008269922282019,
322
+ "len_ratio": 1.2738571132457104,
323
+ "rouge1": 0.029937202334871564,
324
+ "rouge2": 0.004903671236340705,
325
+ "rougeL": 0.02849955863005825,
326
+ "quality_score": -0.157561458250919
327
+ },
328
+ "lgg_to_eng": {
329
+ "bleu": 33.183960121607434,
330
+ "chrf": 0.5724935896324835,
331
+ "cer": 0.41162062430318264,
332
+ "wer": 0.5399960442388099,
333
+ "len_ratio": 0.9959561607358951,
334
+ "rouge1": 0.6295424773311681,
335
+ "rouge2": 0.414141453330078,
336
+ "rougeL": 0.6076793615565902,
337
+ "quality_score": 0.5316563935323873
338
+ },
339
+ "lug_to_eng": {
340
+ "bleu": 41.65427596784633,
341
+ "chrf": 0.641959152367403,
342
+ "cer": 0.33007458554090835,
343
+ "wer": 0.4364174744452259,
344
+ "len_ratio": 0.995614469949668,
345
+ "rouge1": 0.7019737319070327,
346
+ "rouge2": 0.5009750688341794,
347
+ "rougeL": 0.6837419520245854,
348
+ "quality_score": 0.6129542559985584
349
+ },
350
+ "nyn_to_eng": {
351
+ "bleu": 33.827381740261934,
352
+ "chrf": 0.5814058615830704,
353
+ "cer": 0.3826375770314228,
354
+ "wer": 0.5096913838849322,
355
+ "len_ratio": 0.9884081840154549,
356
+ "rouge1": 0.6371410738601032,
357
+ "rouge2": 0.4228617371895637,
358
+ "rougeL": 0.6184775626898391,
359
+ "quality_score": 0.547161559103213
360
+ },
361
+ "swa_to_eng": {
362
+ "bleu": 42.12403395429048,
363
+ "chrf": 0.6511244866804917,
364
+ "cer": 0.3248127435362155,
365
+ "wer": 0.42393942533589124,
366
+ "len_ratio": 0.9881591242064081,
367
+ "rouge1": 0.7104240116477228,
368
+ "rouge2": 0.5166068351637543,
369
+ "rougeL": 0.6881280422432776,
370
+ "quality_score": 0.6203607852070483
371
+ },
372
+ "teo_to_eng": {
373
+ "bleu": 32.487192862281574,
374
+ "chrf": 0.5684747487342591,
375
+ "cer": 0.3912525302692959,
376
+ "wer": 0.5050233717631725,
377
+ "len_ratio": 0.9779057702353239,
378
+ "rouge1": 0.6394775806019763,
379
+ "rouge2": 0.4109552011262328,
380
+ "rougeL": 0.6210169245028457,
381
+ "quality_score": 0.5429275467382381
382
+ },
383
+ "xog_to_eng": {
384
+ "bleu": 18.893891543765875,
385
+ "chrf": 0.4023685911576792,
386
+ "cer": 0.5835602877597674,
387
+ "wer": 0.744059252864993,
388
+ "len_ratio": 1.0487608274645277,
389
+ "rouge1": 0.42280970356012115,
390
+ "rouge2": 0.23623908315016312,
391
+ "rougeL": 0.4104318506665021,
392
+ "quality_score": 0.34948825336620015
393
+ },
394
+ "ttj_to_eng": {
395
+ "bleu": 29.100962682882233,
396
+ "chrf": 0.5249571980106907,
397
+ "cer": 0.4358684131387772,
398
+ "wer": 0.560060677943446,
399
+ "len_ratio": 1.016829177274056,
400
+ "rouge1": 0.5856316196730803,
401
+ "rouge2": 0.3689444466335747,
402
+ "rougeL": 0.5736947324722281,
403
+ "quality_score": 0.49656068098376643
404
+ },
405
+ "averages": {
406
+ "bleu": 25.13967836644146,
407
+ "chrf": 0.4966159249883364,
408
+ "cer": 0.5029564354148366,
409
+ "wer": 0.7279176168541435,
410
+ "len_ratio": 0.999322099680715,
411
+ "rouge1": 0.4985092339260655,
412
+ "rouge2": 0.30599313763063885,
413
+ "rougeL": 0.4834020319605903,
414
+ "quality_score": 0.41650832037840446
415
+ }
416
+ }
417
+ },
418
+ {
419
+ "model": "sunbird-nllb-3.3B",
420
+ "metrics": {
421
+ "ach_to_eng": {
422
+ "bleu": 29.11973177617704,
423
+ "chrf": 0.5314432935977346,
424
+ "cer": 0.4458303843259423,
425
+ "wer": 0.57612930781663,
426
+ "len_ratio": 1.0060317234901897,
427
+ "rouge1": 0.5998762301955666,
428
+ "rouge2": 0.37458530040433596,
429
+ "rougeL": 0.5789635090282815,
430
+ "quality_score": 0.4965867764067968
431
+ },
432
+ "eng_to_ach": {
433
+ "bleu": 20.49858957572721,
434
+ "chrf": 0.5004301347939377,
435
+ "cer": 0.4528755693828615,
436
+ "wer": 0.6782113037259656,
437
+ "len_ratio": 0.9989327733263587,
438
+ "rouge1": 0.5009863598041194,
439
+ "rouge2": 0.25755912923808805,
440
+ "rougeL": 0.4810534513370743,
441
+ "quality_score": 0.42606149476392946
442
+ },
443
+ "eng_to_lgg": {
444
+ "bleu": 20.05048545987706,
445
+ "chrf": 0.49415454647366874,
446
+ "cer": 0.47216319663820605,
447
+ "wer": 0.6898039887446645,
448
+ "len_ratio": 1.0152530745218167,
449
+ "rouge1": 0.5259020378490028,
450
+ "rouge2": 0.27269556217701796,
451
+ "rougeL": 0.498248014428781,
452
+ "quality_score": 0.4261403779945588
453
+ },
454
+ "eng_to_lug": {
455
+ "bleu": 34.39434146308947,
456
+ "chrf": 0.662024107390938,
457
+ "cer": 0.32176812327577214,
458
+ "wer": 0.5263568098304816,
459
+ "len_ratio": 0.9990323458207923,
460
+ "rouge1": 0.589633281523342,
461
+ "rouge2": 0.3904519621826425,
462
+ "rougeL": 0.5781388742150646,
463
+ "quality_score": 0.5542691241089976
464
+ },
465
+ "eng_to_nyn": {
466
+ "bleu": 21.067510181486618,
467
+ "chrf": 0.576304099642706,
468
+ "cer": 0.4095992237539395,
469
+ "wer": 0.7094975523106453,
470
+ "len_ratio": 1.0369875733575387,
471
+ "rouge1": 0.4466546568396715,
472
+ "rouge2": 0.23209128541551535,
473
+ "rougeL": 0.43850325251139943,
474
+ "quality_score": 0.425506722457343
475
+ },
476
+ "eng_to_swa": {
477
+ "bleu": 44.90764186108048,
478
+ "chrf": 0.7146203560186356,
479
+ "cer": 0.2723852696076477,
480
+ "wer": 0.4137906168652137,
481
+ "len_ratio": 1.0248813198797162,
482
+ "rouge1": 0.6994166072573097,
483
+ "rouge2": 0.5118455845181964,
484
+ "rougeL": 0.6805958612631842,
485
+ "quality_score": 0.6429222261128454
486
+ },
487
+ "eng_to_teo": {
488
+ "bleu": 20.284459614385437,
489
+ "chrf": 0.5438482304674738,
490
+ "cer": 0.43321992334718734,
491
+ "wer": 0.6550267664682988,
492
+ "len_ratio": 1.0407314070775626,
493
+ "rouge1": 0.4853574858912598,
494
+ "rouge2": 0.2337512231998303,
495
+ "rougeL": 0.47217194402438006,
496
+ "quality_score": 0.43599592778524704
497
+ },
498
+ "eng_to_xog": {
499
+ "bleu": 10.16505424919429,
500
+ "chrf": 0.418062495851419,
501
+ "cer": 0.4939202748205401,
502
+ "wer": 0.897634971468285,
503
+ "len_ratio": 0.972319126451413,
504
+ "rouge1": 0.25056496535267203,
505
+ "rouge2": 0.08484571673870817,
506
+ "rougeL": 0.24764221429573435,
507
+ "quality_score": 0.27106082861715725
508
+ },
509
+ "eng_to_ttj": {
510
+ "bleu": 15.301771868703554,
511
+ "chrf": 0.4923441359897834,
512
+ "cer": 0.46104872255074464,
513
+ "wer": 0.7733622104426776,
514
+ "len_ratio": 1.0431481399762663,
515
+ "rouge1": 0.37302959299462896,
516
+ "rouge2": 0.16138401996059154,
517
+ "rougeL": 0.3665536323015275,
518
+ "quality_score": 0.3584223578299255
519
+ },
520
+ "lgg_to_eng": {
521
+ "bleu": 28.790977357068755,
522
+ "chrf": 0.5233272096208317,
523
+ "cer": 0.46068120581099303,
524
+ "wer": 0.597573063104669,
525
+ "len_ratio": 1.0304519263957117,
526
+ "rouge1": 0.5855305987067816,
527
+ "rouge2": 0.3677655151230366,
528
+ "rougeL": 0.565512842136962,
529
+ "quality_score": 0.4840043591866002
530
+ },
531
+ "lug_to_eng": {
532
+ "bleu": 42.06884087500722,
533
+ "chrf": 0.6420302109330189,
534
+ "cer": 0.32871907753323737,
535
+ "wer": 0.4342940468963358,
536
+ "len_ratio": 1.000247825208639,
537
+ "rouge1": 0.7094800434749033,
538
+ "rouge2": 0.5064541233924069,
539
+ "rougeL": 0.689735768235689,
540
+ "quality_score": 0.6164868844940183
541
+ },
542
+ "nyn_to_eng": {
543
+ "bleu": 33.14465866594187,
544
+ "chrf": 0.5637049333595793,
545
+ "cer": 0.3876117946383213,
546
+ "wer": 0.5108166855216784,
547
+ "len_ratio": 0.9882578399677422,
548
+ "rouge1": 0.6329615186647974,
549
+ "rouge2": 0.4183838178572328,
550
+ "rougeL": 0.6164938690183747,
551
+ "quality_score": 0.541029737923695
552
+ },
553
+ "swa_to_eng": {
554
+ "bleu": 47.052329072293254,
555
+ "chrf": 0.6892222377335402,
556
+ "cer": 0.28476858898796276,
557
+ "wer": 0.3700288841521645,
558
+ "len_ratio": 1.002994515234727,
559
+ "rouge1": 0.7529059087918626,
560
+ "rouge2": 0.566254405574289,
561
+ "rougeL": 0.733210635501974,
562
+ "quality_score": 0.6651774332683639
563
+ },
564
+ "teo_to_eng": {
565
+ "bleu": 29.87870644400743,
566
+ "chrf": 0.5252286187546552,
567
+ "cer": 0.43447865960403914,
568
+ "wer": 0.5595597975119441,
569
+ "len_ratio": 0.9909164376589676,
570
+ "rouge1": 0.5974291618668124,
571
+ "rouge2": 0.37546488405545797,
572
+ "rougeL": 0.578869581621942,
573
+ "quality_score": 0.5010459949279168
574
+ },
575
+ "xog_to_eng": {
576
+ "bleu": 28.125665148506382,
577
+ "chrf": 0.5057010634098533,
578
+ "cer": 0.4545948687363525,
579
+ "wer": 0.598121571923754,
580
+ "len_ratio": 1.0214763620090188,
581
+ "rouge1": 0.5644995626552085,
582
+ "rouge2": 0.35062850387370176,
583
+ "rougeL": 0.548367176342721,
584
+ "quality_score": 0.4745180022054567
585
+ },
586
+ "ttj_to_eng": {
587
+ "bleu": 30.14139892105478,
588
+ "chrf": 0.5291982808195398,
589
+ "cer": 0.42605764014249364,
590
+ "wer": 0.5500122773797466,
591
+ "len_ratio": 1.0132027420026863,
592
+ "rouge1": 0.6018823971252929,
593
+ "rouge2": 0.3803700460204749,
594
+ "rougeL": 0.5892573310774452,
595
+ "quality_score": 0.5076136801184309
596
+ },
597
+ "averages": {
598
+ "bleu": 28.437010158350052,
599
+ "chrf": 0.5569777471785822,
600
+ "cer": 0.4087326576972651,
601
+ "wer": 0.5962637408851972,
602
+ "len_ratio": 1.0115540707736967,
603
+ "rouge1": 0.557256900562077,
604
+ "rouge2": 0.3427831924832204,
605
+ "rougeL": 0.5414573723337834,
606
+ "quality_score": 0.4891776205125802
607
+ }
608
+ }
609
+ },
610
+ {
611
+ "model": "google-translate",
612
+ "metrics": {
613
+ "ach_to_eng": {
614
+ "bleu": 25.82012707261053,
615
+ "chrf": 0.5057031273960824,
616
+ "cer": 0.4617745077050436,
617
+ "wer": 0.595004667711321,
618
+ "len_ratio": 0.9636727813606757,
619
+ "rouge1": 0.575123846097411,
620
+ "rouge2": 0.3290197121231234,
621
+ "rougeL": 0.5533438889765876,
622
+ "quality_score": 0.472598826296637
623
+ },
624
+ "eng_to_ach": {
625
+ "bleu": 17.4129402377706,
626
+ "chrf": 0.468682516063646,
627
+ "cer": 0.48800545379901034,
628
+ "wer": 0.7526983036199513,
629
+ "len_ratio": 1.0173304711940114,
630
+ "rouge1": 0.4650325796160986,
631
+ "rouge2": 0.22135445162710823,
632
+ "rougeL": 0.44382393779797036,
633
+ "quality_score": 0.3851607797394099
634
+ },
635
+ "eng_to_lug": {
636
+ "bleu": 26.565747903999014,
637
+ "chrf": 0.6023884902489536,
638
+ "cer": 0.3878062612373834,
639
+ "wer": 0.6218423427063132,
640
+ "len_ratio": 1.018827130375813,
641
+ "rouge1": 0.5208782630683307,
642
+ "rouge2": 0.3033559645916972,
643
+ "rougeL": 0.5074844347703342,
644
+ "quality_score": 0.48112667719731866
645
+ },
646
+ "eng_to_swa": {
647
+ "bleu": 60.84743290999219,
648
+ "chrf": 0.7906909029140974,
649
+ "cer": 0.2031302954281225,
650
+ "wer": 0.30459812365054295,
651
+ "len_ratio": 1.0120282818329116,
652
+ "rouge1": 0.7800397358230957,
653
+ "rouge2": 0.6454775766085189,
654
+ "rougeL": 0.764678316404524,
655
+ "quality_score": 0.7393591441938289
656
+ },
657
+ "lug_to_eng": {
658
+ "bleu": 35.700224344812185,
659
+ "chrf": 0.5812880213285667,
660
+ "cer": 0.3639859890535588,
661
+ "wer": 0.4797680581791706,
662
+ "len_ratio": 0.9473770400224313,
663
+ "rouge1": 0.6607218133735266,
664
+ "rouge2": 0.43264293299022016,
665
+ "rougeL": 0.6421587685214877,
666
+ "quality_score": 0.5662361332398289
667
+ },
668
+ "swa_to_eng": {
669
+ "bleu": 47.42800244646666,
670
+ "chrf": 0.7009113380165776,
671
+ "cer": 0.2712123141857987,
672
+ "wer": 0.3557651500473488,
673
+ "len_ratio": 0.9713371029501139,
674
+ "rouge1": 0.7669060465411134,
675
+ "rouge2": 0.5713060632558862,
676
+ "rougeL": 0.7426604606816005,
677
+ "quality_score": 0.6762967342451351
678
+ },
679
+ "averages": {
680
+ "bleu": 35.629079152608526,
681
+ "chrf": 0.6082773993279873,
682
+ "cer": 0.36265247023481956,
683
+ "wer": 0.5182794409857746,
684
+ "len_ratio": 0.988428801289326,
685
+ "rouge1": 0.6281170474199292,
686
+ "rouge2": 0.41719278353275896,
687
+ "rougeL": 0.6090249678587507,
688
+ "quality_score": 0.5534630491520264
689
+ }
690
+ }
691
+ }
692
+ ]
requirements.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn
3
+ pydantic
4
+
5
+ # Core dependencies
6
+ datasets>=2.14.0
7
+ sacrebleu>=2.3.0
8
+ rouge-score>=0.1.2
9
+ Levenshtein>=0.21.0
10
+ numpy>=1.24.0
11
+ pandas>=2.0.0
12
+ matplotlib>=3.7.0
13
+ huggingface_hub>=0.16.0
14
+ PyYAML>=6.0
15
+ plotly>=5.0.0
16
+ google-cloud-translate>=3.0.0
17
+ ipython
18
+
19
+ # Additional dependencies that SALT might need
20
+ transformers>=4.30.0
21
+ torch>=2.0.0