robertselvam commited on
Commit
30e4bcf
·
1 Parent(s): 3b14b18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -58,11 +58,19 @@ with gr.Blocks(css="style.css",theme='xiaobaiyuan/theme_land') as demo:
58
  with gr.Column(elem_id = "col-container",scale=0.80):
59
  clauses_btn = gr.Button("Clauses Extracter")
60
  clauses = gr.Textbox(label = "Clauses", lines=10)
 
 
 
 
 
 
61
 
62
  extractor = Extractor()
63
  upload_button.upload(file_output_fn,upload_button,file_output)
64
  summary_btn.click( extractor._refine_summary,[upload_button],summary)
 
65
 
 
66
  tags_btn.click(Tags.extract_tags,summary,tags)
67
  key_value_btn.click( KeyValue.extract_key_value_pair,summary,key_value)
68
  clauses_btn.click(Clauses.get_extracted_clauses,summary,clauses)
 
58
  with gr.Column(elem_id = "col-container",scale=0.80):
59
  clauses_btn = gr.Button("Clauses Extracter")
60
  clauses = gr.Textbox(label = "Clauses", lines=10)
61
+
62
+ with gr.TabItem("pdf"):
63
+ with gr.Column(elem_id = "col-container",scale=0.80):
64
+ heading_btn = gr.Button("Clauses Extracter")
65
+ heading = gr.Textbox(label = "Clauses", lines=10)
66
+
67
 
68
  extractor = Extractor()
69
  upload_button.upload(file_output_fn,upload_button,file_output)
70
  summary_btn.click( extractor._refine_summary,[upload_button],summary)
71
+ ex= HeadingsExtractor()
72
 
73
+ heading_btn.click(ex.extract_tags,upload_button,heading)
74
  tags_btn.click(Tags.extract_tags,summary,tags)
75
  key_value_btn.click( KeyValue.extract_key_value_pair,summary,key_value)
76
  clauses_btn.click(Clauses.get_extracted_clauses,summary,clauses)