add support for auto language. Not perfect, it picks a language not supported sometimes

This commit is contained in:
Vincent Emonet 2021-01-13 15:33:58 +01:00
parent 9bf3eabb6e
commit 55d3c32b40
3 changed files with 13 additions and 3 deletions

View file

@ -299,6 +299,7 @@ document.addEventListener('DOMContentLoaded', function(){
if (this.status >= 200 && this.status < 400) {
// Success!
self.langs = JSON.parse(this.response);
self.langs.push({ name: 'Auto (experimental)', code: 'auto' })
if (self.langs.length === 0){
self.loading = false;
self.error = "No languages available. Did you install the models correctly?"