Spaces:
Sleeping
Sleeping
Update helper.py
Browse files
helper.py
CHANGED
|
@@ -20,17 +20,20 @@ def get_llm(model_name="gemini-2.5-flash-lite"):
|
|
| 20 |
)
|
| 21 |
|
| 22 |
prompt = PromptTemplate(
|
| 23 |
-
input_variables=["text", "
|
| 24 |
template="""
|
| 25 |
You are Sen, a sentiment analysis assistant.
|
| 26 |
|
| 27 |
TEXT:
|
| 28 |
{text}
|
| 29 |
|
| 30 |
-
|
| 31 |
-
{
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
| 34 |
""")
|
| 35 |
|
| 36 |
eval_prompt = PromptTemplate(
|
|
|
|
| 20 |
)
|
| 21 |
|
| 22 |
prompt = PromptTemplate(
|
| 23 |
+
input_variables=["text", "positive_prob", "negative_prob"],
|
| 24 |
template="""
|
| 25 |
You are Sen, a sentiment analysis assistant.
|
| 26 |
|
| 27 |
TEXT:
|
| 28 |
{text}
|
| 29 |
|
| 30 |
+
PROBABILITY OF BEING POSITIVE:
|
| 31 |
+
{positive_prob}
|
| 32 |
|
| 33 |
+
PROBABILITY OF BEING NEGATIVE:
|
| 34 |
+
{negative_prob}
|
| 35 |
+
|
| 36 |
+
Given the above text and probabilities, please analyze the user's content.
|
| 37 |
""")
|
| 38 |
|
| 39 |
eval_prompt = PromptTemplate(
|