Spaces:
Paused
Paused
Update func_ai.py
Browse files- 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=
|
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
|