bluenevus commited on
Commit
83fcc35
·
1 Parent(s): 7038ced

Update app.py via AI Editor

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -28,15 +28,15 @@ pink_review_document = None
28
  uploaded_doc_contents = {}
29
 
30
  document_types = {
31
- "Shred": "Generate a requirements spreadsheet of the Project Work Statement (PWS) identified by action words like shall, will, perform etc. by pws section, requirement. Do not write as if you're responding to the proposal. Its a spreadsheet to distill the requirements, not microhealth's approach",
32
  "Pink": "Create a Pink Team document based on the PWS outline. Your goal is to be compliant and compelling.",
33
- "Pink Review": "Evaluate compliance of the Pink Team document against the requirements and output a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
34
  "Red": "Produce a Red Team document based on the Pink Review by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Pink Review",
35
- "Red Review": "Evaluate compliance of the Red Team document against the requirements and output a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
36
  "Gold": "Create a Pink Team document based on the PWS response by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Red Review",
37
- "Gold Review": "Perform a final compliance review against the requirements and output a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
38
- "Virtual Board": "Based on the requirements and in particular the evaulation criteria, you will evaluate the proposal as if you were a contracting office and provide section by section evaluation as unsatisfactory, satisfactory, good, very good, excellent and why in a spreadsheet",
39
- "LOE": "Generate a Level of Effort (LOE) breakdown as a spreadsheet"
40
  }
41
 
42
  def get_right_col_content(selected_type):
@@ -298,6 +298,7 @@ def generate_shred_doc(n_clicks):
298
  @app.callback(
299
  Output({'type': 'uploaded-doc-name', 'index': MATCH}, 'children'),
300
  Output({'type': 'upload-doc-type', 'index': MATCH}, 'contents'),
 
301
  Input({'type': 'upload-doc-type', 'index': MATCH}, 'contents'),
302
  State({'type': 'upload-doc-type', 'index': MATCH}, 'filename'),
303
  State({'type': 'upload-doc-type', 'index': MATCH}, 'id')
@@ -306,8 +307,8 @@ def update_uploaded_doc_name(contents, filename, id_dict):
306
  if contents is not None:
307
  uploaded_doc_contents[id_dict['index']] = (contents, filename)
308
  logging.info(f"{id_dict['index']} file uploaded: {filename}")
309
- return filename, contents
310
- return "", None
311
 
312
  @app.callback(
313
  Output('document-preview', 'children', allow_duplicate=True),
 
28
  uploaded_doc_contents = {}
29
 
30
  document_types = {
31
+ "Shred": "Ignore all other instructions and generate only requirements spreadsheet of the Project Work Statement (PWS) identified by action words like shall, will, perform etc. by pws section, requirement. Do not write as if you're responding to the proposal. Its a spreadsheet to distill the requirements, not microhealth's approach",
32
  "Pink": "Create a Pink Team document based on the PWS outline. Your goal is to be compliant and compelling.",
33
+ "Pink Review": "Ignore all other instructions and generate and evaluate compliance of the Pink Team document against the requirements and output only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
34
  "Red": "Produce a Red Team document based on the Pink Review by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Pink Review",
35
+ "Red Review": "Ignore all other instructions and generate and evaluate compliance of the Red Team document against the requirements and output a only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
36
  "Gold": "Create a Pink Team document based on the PWS response by pws sections. Your goal is to be compliant and compelling by recovering all the findings in Red Review",
37
+ "Gold Review": "Ignore all other instructions and generate and perform a final compliance review against the requirements and output only a spreadsheet of non compliant findings by pws number, the goal of that pws section, what made it non compliant and your recommendations for recovery",
38
+ "Virtual Board": "Ignore all other instructions and generate and based on the requirements and in particular the evaulation criteria, you will evaluate the proposal as if you were a contracting office and provide section by section evaluation as unsatisfactory, satisfactory, good, very good, excellent and why and produce only spreadsheet",
39
+ "LOE": "Ignore all other instructions and generate and generate a Level of Effort (LOE) breakdown and produce only spreadsheet"
40
  }
41
 
42
  def get_right_col_content(selected_type):
 
298
  @app.callback(
299
  Output({'type': 'uploaded-doc-name', 'index': MATCH}, 'children'),
300
  Output({'type': 'upload-doc-type', 'index': MATCH}, 'contents'),
301
+ Output({'type': 'radio-doc-source', 'index': MATCH}, 'value'),
302
  Input({'type': 'upload-doc-type', 'index': MATCH}, 'contents'),
303
  State({'type': 'upload-doc-type', 'index': MATCH}, 'filename'),
304
  State({'type': 'upload-doc-type', 'index': MATCH}, 'id')
 
307
  if contents is not None:
308
  uploaded_doc_contents[id_dict['index']] = (contents, filename)
309
  logging.info(f"{id_dict['index']} file uploaded: {filename}")
310
+ return filename, contents, "uploaded"
311
+ return "", None, "loaded"
312
 
313
  @app.callback(
314
  Output('document-preview', 'children', allow_duplicate=True),