Spaces:
Sleeping
Sleeping
Update sentiment_analysis.py
Browse files- sentiment_analysis.py +4 -5
sentiment_analysis.py
CHANGED
@@ -28,14 +28,13 @@ class SentimentAnalysisTool:
|
|
28 |
classifier = pipeline("text-classification", model=model_id, return_all_scores=True)
|
29 |
|
30 |
def predicto(review):
|
31 |
-
classifier = get_prediction(model_id_7)
|
32 |
prediction = classifier(review)
|
33 |
print(prediction)
|
34 |
-
return parse_output(prediction)
|
35 |
|
36 |
-
def __call__(self, inputs: str):
|
37 |
-
|
38 |
-
return xxx
|
39 |
|
40 |
|
41 |
|
|
|
28 |
classifier = pipeline("text-classification", model=model_id, return_all_scores=True)
|
29 |
|
30 |
def predicto(review):
|
31 |
+
classifier = SentimentAnalysisTool.get_prediction(model_id_7)
|
32 |
prediction = classifier(review)
|
33 |
print(prediction)
|
34 |
+
return SentimentAnalysisTool.parse_output(prediction)
|
35 |
|
36 |
+
def __call__(self, inputs: str):
|
37 |
+
return SentimentAnalysisTool.predicto(str)
|
|
|
38 |
|
39 |
|
40 |
|