Spaces:
Paused
Paused
Commit
·
c88093d
1
Parent(s):
b1f723b
Change sentiment analysis task name
Browse files
src/deepeval/deepeval_task_manager.py
CHANGED
@@ -9,7 +9,7 @@ HF_TOKEN=os.getenv("HF_TOKEN")
|
|
9 |
|
10 |
class Task(Enum):
|
11 |
# SUMMARIZATION = "summarization"
|
12 |
-
SENTIMENT_ANALYSIS = "
|
13 |
|
14 |
|
15 |
class DeepEvalTaskManager:
|
@@ -32,11 +32,15 @@ class DeepEvalTaskManager:
|
|
32 |
"""Execute validated tasks in order."""
|
33 |
results = {}
|
34 |
for task_name, task_method in self.tasks_to_run.items():
|
35 |
-
|
|
|
|
|
|
|
|
|
36 |
|
37 |
return results
|
38 |
|
39 |
-
def
|
40 |
st_task = SentimentAnalysisTask(self.model_name)
|
41 |
res = st_task.evaluate()
|
42 |
return res
|
|
|
9 |
|
10 |
class Task(Enum):
|
11 |
# SUMMARIZATION = "summarization"
|
12 |
+
SENTIMENT_ANALYSIS = "sentiment_analysis_tr"
|
13 |
|
14 |
|
15 |
class DeepEvalTaskManager:
|
|
|
32 |
"""Execute validated tasks in order."""
|
33 |
results = {}
|
34 |
for task_name, task_method in self.tasks_to_run.items():
|
35 |
+
task_enum = getattr(Task, task_name)
|
36 |
+
|
37 |
+
# Get the value of the enum member
|
38 |
+
task_value = task_enum.value
|
39 |
+
results[task_value] = task_method() # Call the stored method reference
|
40 |
|
41 |
return results
|
42 |
|
43 |
+
def sentiment_analysis_tr(self):
|
44 |
st_task = SentimentAnalysisTask(self.model_name)
|
45 |
res = st_task.evaluate()
|
46 |
return res
|