Nelly-43 commited on
Commit
bfcb47b
·
verified ·
1 Parent(s): ced2f02

Update app_web.py

Browse files
Files changed (1) hide show
  1. app_web.py +4 -4
app_web.py CHANGED
@@ -239,8 +239,8 @@ def render_chat():
239
  review the files and reach out to you should we need any more information. \
240
  Please let me know if there's anything else I can assist you with today.")
241
  return
242
- print("result: ", qcat_result)
243
- if qcat_result.get("category") == "stata":
244
  print("stata")
245
  # Ask clarification — store original query and question for context
246
  st.session_state.unresolved_category = original_query_cat
@@ -281,8 +281,8 @@ def render_chat():
281
  st.markdown(resolution_msg)
282
  return
283
 
284
- selection = qcat_result.get("sub-action", ["explain"])
285
- print("selection: ", selection)
286
  if selection != "unresolved" or isinstance(selection, list):
287
  qu_enabled = False
288
  selected_options = [options.get(s) for s in selection]
 
239
  review the files and reach out to you should we need any more information. \
240
  Please let me know if there's anything else I can assist you with today.")
241
  return
242
+
243
+ if qcat_result.get("category") == "stata" and (qcat_result.get("sub-action")=="unresolved" or not isinstance(qcat_result.get("sub-action"), list)):
244
  print("stata")
245
  # Ask clarification — store original query and question for context
246
  st.session_state.unresolved_category = original_query_cat
 
281
  st.markdown(resolution_msg)
282
  return
283
 
284
+ selection = qcat_result.get("sub-action", "unresolved")
285
+
286
  if selection != "unresolved" or isinstance(selection, list):
287
  qu_enabled = False
288
  selected_options = [options.get(s) for s in selection]