Spaces:
Sleeping
Sleeping
patrickvonplaten
commited on
Commit
•
d02a3f7
1
Parent(s):
9304840
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import streamlit as st
|
|
6 |
from huggingface_hub import HfApi, hf_hub_download
|
7 |
from huggingface_hub.repocard import metadata_load
|
8 |
|
|
|
9 |
cer_langs = ["ja", "zh-CN", "zh-HK", "zh-TW"]
|
10 |
with open("languages.json") as f:
|
11 |
lang2name = json.load(f)
|
@@ -62,6 +63,7 @@ def parse_metrics_rows(meta):
|
|
62 |
return None
|
63 |
lang = meta["language"]
|
64 |
lang = lang[0] if isinstance(lang, list) else lang
|
|
|
65 |
for result in meta["model-index"][0]["results"]:
|
66 |
if "dataset" not in result or "metrics" not in result:
|
67 |
continue
|
|
|
6 |
from huggingface_hub import HfApi, hf_hub_download
|
7 |
from huggingface_hub.repocard import metadata_load
|
8 |
|
9 |
+
aliases_lang = {"sv": "sv-SE"}
|
10 |
cer_langs = ["ja", "zh-CN", "zh-HK", "zh-TW"]
|
11 |
with open("languages.json") as f:
|
12 |
lang2name = json.load(f)
|
|
|
63 |
return None
|
64 |
lang = meta["language"]
|
65 |
lang = lang[0] if isinstance(lang, list) else lang
|
66 |
+
lang = aliases_lang[lang] if lang in aliases_lang else lang
|
67 |
for result in meta["model-index"][0]["results"]:
|
68 |
if "dataset" not in result or "metrics" not in result:
|
69 |
continue
|