Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -103,7 +103,7 @@ col1, col2 = st.columns([6,1])
|
|
| 103 |
with col1:
|
| 104 |
user_input = st.text_input("Enter customer message:", key="user_input")
|
| 105 |
with col2:
|
| 106 |
-
analyze_clicked = st.button("Analyze")
|
| 107 |
|
| 108 |
if analyze_clicked and user_input.strip():
|
| 109 |
emotion_result = emotion_classifier(user_input)
|
|
@@ -157,5 +157,6 @@ if session["system_result"] is not None:
|
|
| 157 |
for intent in session['system_result']['intents']:
|
| 158 |
suggestion = generate_response(intent)
|
| 159 |
st.markdown(f"**• {intent.capitalize()}**")
|
| 160 |
-
|
|
|
|
| 161 |
session["agent_reply"] = suggestion
|
|
|
|
| 103 |
with col1:
|
| 104 |
user_input = st.text_input("Enter customer message:", key="user_input")
|
| 105 |
with col2:
|
| 106 |
+
analyze_clicked = st.button("Analyze", use_container_width=True)
|
| 107 |
|
| 108 |
if analyze_clicked and user_input.strip():
|
| 109 |
emotion_result = emotion_classifier(user_input)
|
|
|
|
| 157 |
for intent in session['system_result']['intents']:
|
| 158 |
suggestion = generate_response(intent)
|
| 159 |
st.markdown(f"**• {intent.capitalize()}**")
|
| 160 |
+
st.code(suggestion)
|
| 161 |
+
if st.button("Copy to agent reply box", key=f"btn_{selected_customer}_{intent}"):
|
| 162 |
session["agent_reply"] = suggestion
|