robertselvam commited on
Commit
fc836d7
1 Parent(s): 871ed6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -12
app.py CHANGED
@@ -60,21 +60,23 @@ with gr.Blocks(css="style.css",theme='xiaobaiyuan/theme_brief') as demo:
60
  clauses_btn.click(Clauses.get_extracted_clauses,summary,clauses)
61
 
62
  with gr.TabItem("pdf"):
63
- with gr.Row(elem_id = "col-container",scale=0.80):
64
- with gr.Column(elem_id = "col-container",scale=0.80):
65
- file = gr.File(label="File",elem_classes="filenameshow")
 
 
66
 
67
- with gr.Column(elem_id = "col-container",scale=0.20):
68
- upload_button1 = gr.UploadButton(
69
- "Browse File",file_types=[".txt", ".pdf", ".doc", ".docx",".json",".csv"],
70
- elem_classes="uploadbutton")
71
- headings_btn = gr.Button("Get Headings",elem_classes="uploadbutton")
72
 
73
- with gr.Row(elem_id = "col-container",scale=0.60):
74
- headings = gr.Textbox(label = "Headings")
75
 
76
- upload_button1.upload(file_output_fn,upload_button1,file)
77
- headings_btn.click(HeadingsExtractor.extarct_text,upload_button1,headings)
78
 
79
 
80
  demo.launch(debug=True)
 
60
  clauses_btn.click(Clauses.get_extracted_clauses,summary,clauses)
61
 
62
  with gr.TabItem("pdf"):
63
+ ex= HeadingsExtractor()
64
+ ex.gradio_interface()
65
+ # with gr.Row(elem_id = "col-container",scale=0.80):
66
+ # with gr.Column(elem_id = "col-container",scale=0.80):
67
+ # file = gr.File(label="File",elem_classes="filenameshow")
68
 
69
+ # with gr.Column(elem_id = "col-container",scale=0.20):
70
+ # upload_button1 = gr.UploadButton(
71
+ # "Browse File",file_types=[".txt", ".pdf", ".doc", ".docx",".json",".csv"],
72
+ # elem_classes="uploadbutton")
73
+ # headings_btn = gr.Button("Get Headings",elem_classes="uploadbutton")
74
 
75
+ # with gr.Row(elem_id = "col-container",scale=0.60):
76
+ # headings = gr.Textbox(label = "Headings")
77
 
78
+ # upload_button1.upload(file_output_fn,upload_button1,file)
79
+ # headings_btn.click(HeadingsExtractor.extarct_text,upload_button1,headings)
80
 
81
 
82
  demo.launch(debug=True)