Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,9 +120,9 @@ def run_customer_support(query: str, api_key: str) -> Dict[str, str]:
|
|
| 120 |
app = get_workflow(llm)
|
| 121 |
result = app.invoke({"query": query})
|
| 122 |
return {
|
| 123 |
-
"Query": query,
|
| 124 |
-
"Category": result.get("category", "").strip(),
|
| 125 |
-
"Sentiment": result.get("sentiment", "").strip(),
|
| 126 |
"Response": result.get("response", "").strip()
|
| 127 |
}
|
| 128 |
|
|
@@ -130,8 +130,8 @@ def run_customer_support(query: str, api_key: str) -> Dict[str, str]:
|
|
| 130 |
gr_interface = gr.Interface(
|
| 131 |
fn=run_customer_support,
|
| 132 |
inputs=[
|
| 133 |
-
gr.
|
| 134 |
-
gr.
|
| 135 |
],
|
| 136 |
outputs=gr.outputs.JSON(label="Response"),
|
| 137 |
title="Customer Support Chatbot",
|
|
|
|
| 120 |
app = get_workflow(llm)
|
| 121 |
result = app.invoke({"query": query})
|
| 122 |
return {
|
| 123 |
+
# "Query": query,
|
| 124 |
+
# "Category": result.get("category", "").strip(),
|
| 125 |
+
# "Sentiment": result.get("sentiment", "").strip(),
|
| 126 |
"Response": result.get("response", "").strip()
|
| 127 |
}
|
| 128 |
|
|
|
|
| 130 |
gr_interface = gr.Interface(
|
| 131 |
fn=run_customer_support,
|
| 132 |
inputs=[
|
| 133 |
+
gr.Textbox(lines=2, label="Customer Query", placeholder="Enter your customer support query here..."),
|
| 134 |
+
gr.Textbox(label="GROQ API Key", placeholder="Enter your GROQ API key"),
|
| 135 |
],
|
| 136 |
outputs=gr.outputs.JSON(label="Response"),
|
| 137 |
title="Customer Support Chatbot",
|