santoshtyss commited on
Commit
5f3fe7e
·
1 Parent(s): d8630dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -192,7 +192,7 @@ def docx_replace(doc, data):
192
  #print(p.text)
193
  break
194
 
195
- input_output_trans = {"NON-DISCLOSURE AGREEMENT":{"hindi":"NON-DISCLOSURE hindi.docx","telugu":"NON-DISCLOSURE telugu.docx"},"গোপন চুক্তি":{"english":"NON-DISCLOSURE.docx"}}
196
 
197
 
198
  def translate_fill(document_name,output_file, src, trg):
@@ -374,7 +374,7 @@ def run_contract_extraction(document_name, output_file):
374
 
375
  return output_file
376
 
377
- input_output_key = {"NON-DISCLOSURE AGREEMENT":"NON-DISCLOSURE key_clauses.txt"}
378
 
379
  def run_key_clause(document_name, output_name,source_language):
380
  doc = docx.Document(document_name)
@@ -480,7 +480,7 @@ def extract_questions(document_name, output_file):
480
 
481
  return output_file
482
 
483
- input_output_qg = {"NON-DISCLOSURE AGREEMENT":"NON-DISCLOSURE QG.docx"}
484
 
485
 
486
  def run_generate_questions(document_name, output_file, questions_file, delimiter, source_language):
@@ -507,7 +507,7 @@ from docx.shared import RGBColor
507
  import time
508
  import re
509
 
510
- input_output_red = {"NON-DISCLOSURE AGREEMENT":"NON-DISCLOSURE red flag.docx"}
511
 
512
  def run_redflags(filename, output_file):
513
  print("Red flags")
@@ -587,7 +587,7 @@ def extract_info(questions, context):
587
  variables.append({"{{"+question+"}}" : answer})
588
  return variables, unanswered
589
 
590
- input_output_exin = {"NON-DISCLOSURE AGREEMENT":"NON-DISCLOSURE Info.docx"}
591
 
592
  def run_extract_info(document_name, context, output_file, source_language):
593
  print("Extract")
@@ -712,7 +712,7 @@ def get_similar_clauses(filename, output_file,clauses, source_language):
712
  return output_file, highlighted_paras
713
 
714
 
715
- input_output_similar = {"NON-DISCLOSURE AGREEMENT":[{"clauses":["procedure when information needs to be revealed to third person"], "file":"NON-DISCLOSURE 1.docx"},{"clauses":["term","validity period","time period","duration"], "file":"NON-DISCLOSURE 2.docx"}], "dummy.docx":[{"clauses":["lets see","whatever"],"file":"dummy_colored.docx"}]}
716
 
717
  def get_highlighted_clauses(filename):
718
  doc = docx.Document(filename)
 
192
  #print(p.text)
193
  break
194
 
195
+ input_output_trans = {}
196
 
197
 
198
  def translate_fill(document_name,output_file, src, trg):
 
374
 
375
  return output_file
376
 
377
+ input_output_key = {}
378
 
379
  def run_key_clause(document_name, output_name,source_language):
380
  doc = docx.Document(document_name)
 
480
 
481
  return output_file
482
 
483
+ input_output_qg = {}
484
 
485
 
486
  def run_generate_questions(document_name, output_file, questions_file, delimiter, source_language):
 
507
  import time
508
  import re
509
 
510
+ input_output_red = {}
511
 
512
  def run_redflags(filename, output_file):
513
  print("Red flags")
 
587
  variables.append({"{{"+question+"}}" : answer})
588
  return variables, unanswered
589
 
590
+ input_output_exin = {}
591
 
592
  def run_extract_info(document_name, context, output_file, source_language):
593
  print("Extract")
 
712
  return output_file, highlighted_paras
713
 
714
 
715
+ input_output_similar = {}
716
 
717
  def get_highlighted_clauses(filename):
718
  doc = docx.Document(filename)