Spaces:
Runtime error
Runtime error
horriblecpp commited on
Commit ·
6541961
1
Parent(s): 11b29e8
Fix NameError by defining utts before use
Browse files- frontend/app.py +3 -0
frontend/app.py
CHANGED
|
@@ -881,6 +881,9 @@ with tab_intents:
|
|
| 881 |
is_match = bool(classified and classified.get("intent") == il and classified.get("domain") == dom)
|
| 882 |
prefix = "🎯 " if is_match else ""
|
| 883 |
|
|
|
|
|
|
|
|
|
|
| 884 |
# Use HTML details tag to avoid nested expander exception
|
| 885 |
utts_html = "".join([f"<li><small>{u}</small></li>" for u in utts])
|
| 886 |
st.markdown(
|
|
|
|
| 881 |
is_match = bool(classified and classified.get("intent") == il and classified.get("domain") == dom)
|
| 882 |
prefix = "🎯 " if is_match else ""
|
| 883 |
|
| 884 |
+
# Extract utterances for this specific intent
|
| 885 |
+
utts = [r["utterance"] for r in rows_i if r["domain"] == dom and r["intent"] == il]
|
| 886 |
+
|
| 887 |
# Use HTML details tag to avoid nested expander exception
|
| 888 |
utts_html = "".join([f"<li><small>{u}</small></li>" for u in utts])
|
| 889 |
st.markdown(
|