Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def categorize(state: State) -> State:
|
|
33 |
def analyze_sentiment(state: State) -> State:
|
34 |
prompt = ChatPromptTemplate.from_template(
|
35 |
"Analyze the sentiment of the following customer query"
|
36 |
-
"Response with either '
|
37 |
)
|
38 |
chain = prompt | llm
|
39 |
sentiment = chain.invoke({"query": state["query"]}).content
|
|
|
33 |
def analyze_sentiment(state: State) -> State:
|
34 |
prompt = ChatPromptTemplate.from_template(
|
35 |
"Analyze the sentiment of the following customer query"
|
36 |
+
"Response with either 'Positive', 'Neutral' , or 'Negative'. Query: {query}"
|
37 |
)
|
38 |
chain = prompt | llm
|
39 |
sentiment = chain.invoke({"query": state["query"]}).content
|