bluenevus commited on
Commit
4bd301f
·
1 Parent(s): f6aa030

Update app.py via AI Editor

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -595,8 +595,8 @@ app.layout = dbc.Container([
595
  html.Ol([
596
  html.Li("Start by uploading a RFP, SOW, PWS or RFI"),
597
  html.Li("Next click Shred to get an spreadsheet of the key requirements"),
598
- html.Li("Generate a proposal. You can have it generate the proposal from wither the uploaded RFP, SOW, PWS or RFI or Shred. select that in the dropdown list under Documents. If you don't already have a proposal document, just upload it under proposals for the next steps"),
599
- html.Li("Check compliance against a document you select in the Proposal section. Chose the document you want to evaluate by selecting it on the dropdown list. You must also choose what you want to evaluate it against, from the Documents list like the PWS or the Shred"),
600
  html.Li("Recover a document by selecting a document from the proposal and like PWS, shred or compliance check (recommended) under Documents. This will recover any sections that to fix based on the document selected like pws, shred or compliance"),
601
  html.Li("Simulate a virtual board evaluation, which you must select the PWS under documents and the document under proposals you want to evaluate. That will give you representative board ratings. If you want to recover based on these board ratings, select the document under proposal and the board evaluation document under Documents and then click recover it will recover the problem areas based on the findings."),
602
  html.Li("Generate an LOE by selecting the document like PWS, and click LOE, you will get an estimated LOE."),
@@ -737,6 +737,14 @@ def master_callback(
737
  uploaded_rfp_decoded_bytes = None
738
 
739
  if triggered_id == 'cancel-action-btn':
 
 
 
 
 
 
 
 
740
  output_data_upload = html.Div("[Cancelled by user]\n", style={"wordWrap": "break-word"})
741
  doc_options = [{'label': truncate_filename(fn), 'value': fn} for fn in sess_data["uploaded_documents"].keys()]
742
  doc_value = selected_doc if selected_doc in sess_data["uploaded_documents"] else (next(iter(sess_data["uploaded_documents"]), None) if sess_data["uploaded_documents"] else None)
 
595
  html.Ol([
596
  html.Li("Start by uploading a RFP, SOW, PWS or RFI"),
597
  html.Li("Next click Shred to get an spreadsheet of the key requirements"),
598
+ html.Li("Generate a proposal. You can have it generate the proposal from either the uploaded RFP, SOW, PWS or RFI or Shred. Select that in the dropdown list under Documents. If you don't already have a proposal document, just upload it under proposals for the next steps"),
599
+ html.Li("Check compliance against a document you select in the Proposal section. Choose the document you want to evaluate by selecting it on the dropdown list. You must also choose what you want to evaluate it against, from the Documents list like the PWS or the Shred"),
600
  html.Li("Recover a document by selecting a document from the proposal and like PWS, shred or compliance check (recommended) under Documents. This will recover any sections that to fix based on the document selected like pws, shred or compliance"),
601
  html.Li("Simulate a virtual board evaluation, which you must select the PWS under documents and the document under proposals you want to evaluate. That will give you representative board ratings. If you want to recover based on these board ratings, select the document under proposal and the board evaluation document under Documents and then click recover it will recover the problem areas based on the findings."),
602
  html.Li("Generate an LOE by selecting the document like PWS, and click LOE, you will get an estimated LOE."),
 
737
  uploaded_rfp_decoded_bytes = None
738
 
739
  if triggered_id == 'cancel-action-btn':
740
+ # Release Gemini lock if held, to allow cancellation of Gemini operation
741
+ lock = sess_data.get("gemini_lock")
742
+ if lock and lock.locked():
743
+ try:
744
+ lock.release()
745
+ logging.info(f"[{sid}] Gemini lock released on cancel.")
746
+ except RuntimeError:
747
+ logging.warning(f"[{sid}] Attempted to release an unlocked Gemini lock.")
748
  output_data_upload = html.Div("[Cancelled by user]\n", style={"wordWrap": "break-word"})
749
  doc_options = [{'label': truncate_filename(fn), 'value': fn} for fn in sess_data["uploaded_documents"].keys()]
750
  doc_value = selected_doc if selected_doc in sess_data["uploaded_documents"] else (next(iter(sess_data["uploaded_documents"]), None) if sess_data["uploaded_documents"] else None)