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