Download runtime/inference/catalog.py from hscr/luxfer: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/hscr/luxfer/resolve/main/runtime/inference/catalog.py
- Command line
-
hf download hf://hscr/luxfer/runtime/inference/catalog.py
-
curl -L -o catalog.py https://huggingface.co/hscr/luxfer/resolve/main/runtime/inference/catalog.py
1.24 kB
| """Display names and status for the complete supplied language inventory.""" | |
| import json | |
| from pathlib import Path | |
| NAMES={'ja':'Japanese','en':'English','zh-hans':'Chinese (Simplified)','zh-hant':'Chinese (Traditional)','ko':'Korean','ar':'Arabic','az':'Azerbaijani','be':'Belarusian','bg':'Bulgarian','bn':'Bengali','ca':'Catalan','ceb':'Cebuano','de':'German','es':'Spanish','et':'Estonian','eu':'Basque','fa':'Persian (Farsi)','fr':'French','gu':'Gujarati','he':'Hebrew','hi':'Hindi','hr':'Croatian','hu':'Hungarian','hy':'Armenian','id':'Indonesian','it':'Italian','jv':'Javanese','ka':'Georgian','kk':'Kazakh','km':'Khmer','lt':'Lithuanian','lv':'Latvian','ml':'Malayalam','mr':'Marathi','ms':'Malay','my':'Burmese','ne':'Nepali','nl':'Dutch','pa':'Punjabi','pl':'Polish','ru':'Russian','si':'Sinhala','sk':'Slovak','sl':'Slovenian','sr':'Serbian','sw':'Swahili','ta':'Tamil','te':'Telugu','th':'Thai','tl':'Tagalog','ur':'Urdu','uz':'Uzbek','vi':'Vietnamese','pt':'Portuguese (experimental)'} | |
| def languages(): | |
| codes=json.loads((Path(__file__).resolve().parents[1]/'configs/languages.json').read_text()) | |
| return [dict(code=code,name=NAMES[code],status='experimental' if code=='pt' else 'upstream_listed') for code in codes+['pt']] | |