banao-tech commited on
Commit
115e64a
·
verified ·
1 Parent(s): 7466b00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -1082,29 +1082,22 @@ else:
1082
  }
1083
 
1084
  if len(valid_topics) > 1:
1085
- st.write(f"DEBUG: global_manual_id = {global_manual_id}")
1086
  # Extract prefix and increment the last number
1087
  parts = global_manual_id.rsplit("_", 1)
1088
- st.write(f"DEBUG: parts = {parts}")
1089
  if len(parts) == 2:
1090
  prefix = parts[0]
1091
  try:
1092
  base_num = int(parts[1])
1093
- st.write(f"DEBUG: prefix = {prefix}, base_num = {base_num}, i = {i}")
1094
  topic_entry["manual_session_id"] = f"{prefix}_{base_num + i}"
1095
- st.write(f"DEBUG: Generated ID = {topic_entry['manual_session_id']}")
1096
  except ValueError:
1097
  # Fallback: append index if last part is not a number
1098
  topic_entry["manual_session_id"] = f"{global_manual_id}_{i+1}"
1099
- st.write(f"DEBUG: ValueError fallback - Generated ID = {topic_entry['manual_session_id']}")
1100
  else:
1101
  # No underscore found: append index
1102
  topic_entry["manual_session_id"] = f"{global_manual_id}_{i+1}"
1103
- st.write(f"DEBUG: No underscore fallback - Generated ID = {topic_entry['manual_session_id']}")
1104
  else:
1105
  # Single topic: use manual ID as-is
1106
  topic_entry["manual_session_id"] = global_manual_id
1107
- st.write(f"DEBUG: Single topic - Using ID as-is = {topic_entry['manual_session_id']}")
1108
 
1109
  topics_data.append(topic_entry)
1110
 
 
1082
  }
1083
 
1084
  if len(valid_topics) > 1:
 
1085
  # Extract prefix and increment the last number
1086
  parts = global_manual_id.rsplit("_", 1)
 
1087
  if len(parts) == 2:
1088
  prefix = parts[0]
1089
  try:
1090
  base_num = int(parts[1])
 
1091
  topic_entry["manual_session_id"] = f"{prefix}_{base_num + i}"
 
1092
  except ValueError:
1093
  # Fallback: append index if last part is not a number
1094
  topic_entry["manual_session_id"] = f"{global_manual_id}_{i+1}"
 
1095
  else:
1096
  # No underscore found: append index
1097
  topic_entry["manual_session_id"] = f"{global_manual_id}_{i+1}"
 
1098
  else:
1099
  # Single topic: use manual ID as-is
1100
  topic_entry["manual_session_id"] = global_manual_id
 
1101
 
1102
  topics_data.append(topic_entry)
1103