Spaces:
Runtime error
Runtime error
Karthikeyan
commited on
Commit
•
a6daced
1
Parent(s):
fd972a7
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ class Summarizer:
|
|
81 |
message = completions.choices[0].text.strip()
|
82 |
return message
|
83 |
|
84 |
-
history_state = gr.State(
|
85 |
summarizer = Summarizer()
|
86 |
sentiment = SentimentAnalyzer()
|
87 |
|
@@ -202,8 +202,6 @@ class LangChain_Document_QA:
|
|
202 |
|
203 |
return scores,customer_fig,agent_fig,customer_emotion_fig,agent_emotion_fig
|
204 |
|
205 |
-
def clear_func(self,history_state):
|
206 |
-
history_state.clear()
|
207 |
|
208 |
def gradio_interface(self):
|
209 |
with gr.Blocks(css="style.css",theme=gr.themes.Soft()) as demo:
|
@@ -285,7 +283,7 @@ class LangChain_Document_QA:
|
|
285 |
self._agent_text, [chatbot, txt2], chatbot
|
286 |
)
|
287 |
end_btn.click(self._display_history, [], txt4)
|
288 |
-
|
289 |
Sentiment_btn.click(self._on_sentiment_btn_click,[],[txt5,plot,plot_2,plot_3,plot_4])
|
290 |
|
291 |
demo.title = "Vodafone Generative AI CRM ChatBot"
|
|
|
81 |
message = completions.choices[0].text.strip()
|
82 |
return message
|
83 |
|
84 |
+
history_state = gr.State()
|
85 |
summarizer = Summarizer()
|
86 |
sentiment = SentimentAnalyzer()
|
87 |
|
|
|
202 |
|
203 |
return scores,customer_fig,agent_fig,customer_emotion_fig,agent_emotion_fig
|
204 |
|
|
|
|
|
205 |
|
206 |
def gradio_interface(self):
|
207 |
with gr.Blocks(css="style.css",theme=gr.themes.Soft()) as demo:
|
|
|
283 |
self._agent_text, [chatbot, txt2], chatbot
|
284 |
)
|
285 |
end_btn.click(self._display_history, [], txt4)
|
286 |
+
|
287 |
Sentiment_btn.click(self._on_sentiment_btn_click,[],[txt5,plot,plot_2,plot_3,plot_4])
|
288 |
|
289 |
demo.title = "Vodafone Generative AI CRM ChatBot"
|