Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jiwoo424 committed Dec 29, 2024
1 parent 9fe9b11 commit 30a658b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
11 changes: 1 addition & 10 deletions REC.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,4 @@ def recommend_clause(clause, agreements= agreements.loc[:2], threshold=0.4):
if distances[idx] < threshold:
indices_ini.append(idx)
indices_ini = list(set(indices_ini))
return indices_ini

def print_agreements():
if loan == 'O':
indices.append(3)
if insurance == 'O':
indices.append(4)
indices.append(5)
result = agreements.loc[indices]
return result
return indices_ini
9 changes: 9 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,15 @@ def extract_ocr_text(ocr_result):
indices = recommend_clause(clause = clauses)
loan = 'O'
insurance = 'O'

def print_agreements():
if loan == 'O':
indices.append(3)
if insurance == 'O':
indices.append(4)
indices.append(5)
result = agreements.loc[indices]
return result
rec_df = print_agreements()

for idx, row in rec_df.iterrows():
Expand Down

0 comments on commit 30a658b

Please sign in to comment.