NeuralFalcon commited on
Commit
f85a4fa
·
verified ·
1 Parent(s): e78a5ff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -37,6 +37,8 @@ def update_pipeline(Language):
37
  pipeline = KPipeline(lang_code=new_lang)
38
  last_used_language = new_lang # Update last used language
39
  except Exception as e:
 
 
40
  pipeline = KPipeline(lang_code="a") # Fallback to English
41
  last_used_language = "a"
42
 
 
37
  pipeline = KPipeline(lang_code=new_lang)
38
  last_used_language = new_lang # Update last used language
39
  except Exception as e:
40
+ gr.Warning(f"Make sure the input text is in {Language}}",duration=10)
41
+ gr.Warning(f"Fallback to English Language",duration=5)
42
  pipeline = KPipeline(lang_code="a") # Fallback to English
43
  last_used_language = "a"
44