Uniaff commited on
Commit
a5f8643
·
verified ·
1 Parent(s): 3518c39

Update func_ai.py

Browse files
Files changed (1) hide show
  1. func_ai.py +1 -1
func_ai.py CHANGED
@@ -27,7 +27,7 @@ classifier = pipeline(
27
 
28
 
29
  def classify_comment(text):
30
- translated_text = GoogleTranslator(source='auto', target=target_language).translate(text)
31
  result = classifier(translated_text.text, ["interrogative", "non-interrogative"], clean_up_tokenization_spaces=True)
32
  top_class = result['labels'][0]
33
  return top_class
 
27
 
28
 
29
  def classify_comment(text):
30
+ translated_text = GoogleTranslator(source='auto', target="en").translate(text)
31
  result = classifier(translated_text.text, ["interrogative", "non-interrogative"], clean_up_tokenization_spaces=True)
32
  top_class = result['labels'][0]
33
  return top_class