lukecq commited on
Commit
fc4bf24
·
verified ·
1 Parent(s): 971f1fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -87,10 +87,11 @@ def contains_chinese(text):
87
  return bool(chinese_char_pattern.search(text))
88
 
89
  def compare_responses(audio_url, text):
90
- if contains_chinese:
91
  return "Caution! This demo does not support Chinese!"
92
 
93
  response1 = response_to_audio(audio_url, text, model1, processor1)
 
94
  return "ERROR! Try another example!"
95
 
96
  return response1
 
87
  return bool(chinese_char_pattern.search(text))
88
 
89
  def compare_responses(audio_url, text):
90
+ if contains_chinese(text):
91
  return "Caution! This demo does not support Chinese!"
92
 
93
  response1 = response_to_audio(audio_url, text, model1, processor1)
94
+ if contains_chinese(response1):
95
  return "ERROR! Try another example!"
96
 
97
  return response1