karthikeyan-r commited on
Commit
56a3296
1 Parent(s): 9b835c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -24
app.py CHANGED
@@ -153,9 +153,9 @@ if selected_main_option == "Dashboard":
153
  with col10:
154
  if st.button("Aggressive Content"):
155
  button_value = 'Aggressive Content'
156
- with col11:
157
- if st.button("Contract Generator"):
158
- button_value = 'Contract Generator'
159
 
160
  if button_value == '' or button_value == 'Home':
161
  st.title('')
@@ -447,28 +447,28 @@ if selected_main_option == "Dashboard":
447
  st.toast("No Document is Uploaded.")
448
 
449
  # Contract Generator
450
- elif button_value == 'Contract Generator':
451
- confirmationGen = Modal("Contract Generator", key= "contract_gen1")
452
- get_response=''
453
- contract_info=st.text_input("Enter Contract info")
454
- if contract_info not in None:
455
- conversation = [{"role": "system", "content": """You are a helpful assistant. Your task is creating a complete contract with important terms and condiations based on the contract information and type.
456
- the contract type given by user.
457
- generate a contract :
458
- """},
459
- {"role": "user", "content": f"```content: {contract_info}```"}]
460
- get_response = openai.get_response(conversation)
461
- if get_response == ['', None]:
462
- st.toast("No Result is founded.")
463
- else:
464
- with confirmationGen.container():
465
- st.write("Contract Template")
466
- st.write(get_response)
467
 
468
- if st.button('Close.'):
469
- confirmationGen.close()
470
- else:
471
- st.toast("Please Enter Contract Info")
472
 
473
  elif selected_main_option == "Update Find":
474
  processor = PDFDocumentProcessor()
 
153
  with col10:
154
  if st.button("Aggressive Content"):
155
  button_value = 'Aggressive Content'
156
+ # with col11:
157
+ # if st.button("Contract Generator"):
158
+ # button_value = 'Contract Generator'
159
 
160
  if button_value == '' or button_value == 'Home':
161
  st.title('')
 
447
  st.toast("No Document is Uploaded.")
448
 
449
  # Contract Generator
450
+ # elif button_value == 'Contract Generator':
451
+ # confirmationGen = Modal("Contract Generator", key= "contract_gen1")
452
+ # get_response=''
453
+ # contract_info=st.text_input("Enter Contract info")
454
+ # if contract_info not in None:
455
+ # conversation = [{"role": "system", "content": """You are a helpful assistant. Your task is creating a complete contract with important terms and condiations based on the contract information and type.
456
+ # the contract type given by user.
457
+ # generate a contract :
458
+ # """},
459
+ # {"role": "user", "content": f"```content: {contract_info}```"}]
460
+ # get_response = openai.get_response(conversation)
461
+ # if get_response == ['', None]:
462
+ # st.toast("No Result is founded.")
463
+ # else:
464
+ # with confirmationGen.container():
465
+ # st.write("Contract Template")
466
+ # st.write(get_response)
467
 
468
+ # if st.button('Close.'):
469
+ # confirmationGen.close()
470
+ # else:
471
+ # st.toast("Please Enter Contract Info")
472
 
473
  elif selected_main_option == "Update Find":
474
  processor = PDFDocumentProcessor()