Spaces:
Running
Running
karthikeyan-r
commited on
Commit
•
2cd6d9d
1
Parent(s):
44323f0
Update app.py
Browse files
app.py
CHANGED
@@ -205,7 +205,7 @@ if selected_main_option == "Dashboard":
|
|
205 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
206 |
get_response = openai.get_response(conversation)
|
207 |
if get_response == ['', None]:
|
208 |
-
st.
|
209 |
else:
|
210 |
with confirmationClauses.container():
|
211 |
st.write("Similarity Scores Table:")
|
@@ -233,7 +233,7 @@ if selected_main_option == "Dashboard":
|
|
233 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
234 |
get_response = openai.get_response(conversation)
|
235 |
if get_response == ['', None]:
|
236 |
-
st.
|
237 |
else:
|
238 |
with confirmationSummarizer.container():
|
239 |
st.write("summarizer Extracter:")
|
@@ -261,7 +261,7 @@ if selected_main_option == "Dashboard":
|
|
261 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
262 |
get_response = openai.get_response(conversation)
|
263 |
if get_response == ['', None]:
|
264 |
-
st.
|
265 |
else:
|
266 |
with confirmationHeadings.container():
|
267 |
st.write("Headings Extracter:")
|
@@ -296,7 +296,7 @@ if selected_main_option == "Dashboard":
|
|
296 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
297 |
get_response = openai.get_response(conversation)
|
298 |
if get_response == ['', None]:
|
299 |
-
st.
|
300 |
else:
|
301 |
with confirmationExtractDate.container():
|
302 |
st.write("Extract Date Extracter:")
|
@@ -323,7 +323,7 @@ if selected_main_option == "Dashboard":
|
|
323 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
324 |
get_response = openai.get_response(conversation)
|
325 |
if get_response == ['', None]:
|
326 |
-
st.
|
327 |
else:
|
328 |
with confirmationPdf.container():
|
329 |
st.write("Pdf to Json Extracter:")
|
@@ -351,7 +351,7 @@ if selected_main_option == "Dashboard":
|
|
351 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
352 |
get_response = openai.get_response(conversation)
|
353 |
if get_response == ['', None]:
|
354 |
-
st.
|
355 |
else:
|
356 |
with confirmationKey.container():
|
357 |
st.write("Key values Extracter:")
|
@@ -379,7 +379,7 @@ if selected_main_option == "Dashboard":
|
|
379 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
380 |
get_response = openai.get_response(conversation)
|
381 |
if get_response == ['', None]:
|
382 |
-
st.
|
383 |
else:
|
384 |
with confirmationIncorrect.container():
|
385 |
st.write("Incorrect Sentences Extracter:")
|
@@ -407,7 +407,7 @@ if selected_main_option == "Dashboard":
|
|
407 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
408 |
get_response = openai.get_response(conversation)
|
409 |
if get_response == ['', None]:
|
410 |
-
st.
|
411 |
else:
|
412 |
with confirmationIncomplete.container():
|
413 |
st.write("Incomplete Sentences Extracter:")
|
@@ -435,7 +435,7 @@ if selected_main_option == "Dashboard":
|
|
435 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
436 |
get_response = openai.get_response(conversation)
|
437 |
if get_response == ['', None]:
|
438 |
-
st.
|
439 |
else:
|
440 |
with confirmationAgg.container():
|
441 |
st.write("Aggressive content Extracter:")
|
@@ -448,7 +448,7 @@ if selected_main_option == "Dashboard":
|
|
448 |
|
449 |
# Contract Generator
|
450 |
elif button_value == 'Contract Generator':
|
451 |
-
|
452 |
get_response=''
|
453 |
contract_info=st.text_input("Enter Contract info")
|
454 |
if contract_info!='':
|
@@ -458,12 +458,16 @@ if selected_main_option == "Dashboard":
|
|
458 |
"""},
|
459 |
{"role": "user", "content": f"```content: {contract_info}```"}]
|
460 |
get_response = openai.get_response(conversation)
|
461 |
-
|
462 |
-
|
|
|
|
|
|
|
463 |
st.write("Contract Template")
|
464 |
st.write(get_response)
|
465 |
-
|
466 |
-
|
|
|
467 |
else:
|
468 |
st.toast("Please Enter Contract Info")
|
469 |
|
|
|
205 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
206 |
get_response = openai.get_response(conversation)
|
207 |
if get_response == ['', None]:
|
208 |
+
st.toast("No Result is founded.")
|
209 |
else:
|
210 |
with confirmationClauses.container():
|
211 |
st.write("Similarity Scores Table:")
|
|
|
233 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
234 |
get_response = openai.get_response(conversation)
|
235 |
if get_response == ['', None]:
|
236 |
+
st.toast("No Result is founded.")
|
237 |
else:
|
238 |
with confirmationSummarizer.container():
|
239 |
st.write("summarizer Extracter:")
|
|
|
261 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
262 |
get_response = openai.get_response(conversation)
|
263 |
if get_response == ['', None]:
|
264 |
+
st.toast("No Result is founded.")
|
265 |
else:
|
266 |
with confirmationHeadings.container():
|
267 |
st.write("Headings Extracter:")
|
|
|
296 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
297 |
get_response = openai.get_response(conversation)
|
298 |
if get_response == ['', None]:
|
299 |
+
st.toast("No Result is founded.")
|
300 |
else:
|
301 |
with confirmationExtractDate.container():
|
302 |
st.write("Extract Date Extracter:")
|
|
|
323 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
324 |
get_response = openai.get_response(conversation)
|
325 |
if get_response == ['', None]:
|
326 |
+
st.toast("No Result is founded.")
|
327 |
else:
|
328 |
with confirmationPdf.container():
|
329 |
st.write("Pdf to Json Extracter:")
|
|
|
351 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
352 |
get_response = openai.get_response(conversation)
|
353 |
if get_response == ['', None]:
|
354 |
+
st.toast("No Result is founded.")
|
355 |
else:
|
356 |
with confirmationKey.container():
|
357 |
st.write("Key values Extracter:")
|
|
|
379 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
380 |
get_response = openai.get_response(conversation)
|
381 |
if get_response == ['', None]:
|
382 |
+
st.toast("No Result is founded.")
|
383 |
else:
|
384 |
with confirmationIncorrect.container():
|
385 |
st.write("Incorrect Sentences Extracter:")
|
|
|
407 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
408 |
get_response = openai.get_response(conversation)
|
409 |
if get_response == ['', None]:
|
410 |
+
st.toast("No Result is founded.")
|
411 |
else:
|
412 |
with confirmationIncomplete.container():
|
413 |
st.write("Incomplete Sentences Extracter:")
|
|
|
435 |
{"role": "user", "content": f"```contract: {docs_data}```"}]
|
436 |
get_response = openai.get_response(conversation)
|
437 |
if get_response == ['', None]:
|
438 |
+
st.toast("No Result is founded.")
|
439 |
else:
|
440 |
with confirmationAgg.container():
|
441 |
st.write("Aggressive content Extracter:")
|
|
|
448 |
|
449 |
# Contract Generator
|
450 |
elif button_value == 'Contract Generator':
|
451 |
+
confirmationGen = Modal("Contract Generator", key= "contract_gen")
|
452 |
get_response=''
|
453 |
contract_info=st.text_input("Enter Contract info")
|
454 |
if contract_info!='':
|
|
|
458 |
"""},
|
459 |
{"role": "user", "content": f"```content: {contract_info}```"}]
|
460 |
get_response = openai.get_response(conversation)
|
461 |
+
|
462 |
+
if get_response == ['', None]:
|
463 |
+
st.toast("No Result is founded.")
|
464 |
+
else:
|
465 |
+
with confirmationGen.container():
|
466 |
st.write("Contract Template")
|
467 |
st.write(get_response)
|
468 |
+
|
469 |
+
if st.button('Close.'):
|
470 |
+
confirmationGen.close()
|
471 |
else:
|
472 |
st.toast("Please Enter Contract Info")
|
473 |
|