Spaces:
Sleeping
Sleeping
Update sentiment_analysis.py
Browse files- sentiment_analysis.py +3 -3
sentiment_analysis.py
CHANGED
@@ -5,7 +5,7 @@ from transformers import Tool
|
|
5 |
|
6 |
class SentimentAnalysisTool(Tool):
|
7 |
name = "sentiment_analysis"
|
8 |
-
description = "This tool analyses the sentiment of a given text
|
9 |
|
10 |
inputs = ["text"] # Adding an empty list for inputs
|
11 |
outputs = ["json"]
|
@@ -18,8 +18,8 @@ class SentimentAnalysisTool(Tool):
|
|
18 |
model_id_6 = "sbcBI/sentiment_analysis_model"
|
19 |
model_id_7 = "models/oliverguhr/german-sentiment-bert"
|
20 |
|
21 |
-
def __call__(self,
|
22 |
-
return self.predicto(
|
23 |
|
24 |
def parse_output(self, output_json):
|
25 |
list_pred = []
|
|
|
5 |
|
6 |
class SentimentAnalysisTool(Tool):
|
7 |
name = "sentiment_analysis"
|
8 |
+
description = "This tool analyses the sentiment of a given text."
|
9 |
|
10 |
inputs = ["text"] # Adding an empty list for inputs
|
11 |
outputs = ["json"]
|
|
|
18 |
model_id_6 = "sbcBI/sentiment_analysis_model"
|
19 |
model_id_7 = "models/oliverguhr/german-sentiment-bert"
|
20 |
|
21 |
+
def __call__(self, text: str):
|
22 |
+
return self.predicto(text)
|
23 |
|
24 |
def parse_output(self, output_json):
|
25 |
list_pred = []
|