Cachoups commited on
Commit
25031d5
·
verified ·
1 Parent(s): ee0e5a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -304,10 +304,8 @@ stored_df2 = []
304
 
305
  with gr.Blocks(theme='gradio/soft') as demo:
306
  with gr.Row().style(equal_height=True):
307
- with gr.Column(scale=10):
308
  with gr.Column(scale=3):
309
  with gr.Box():
310
- dropdown.render()
311
  toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
312
 
313
  toggle_dark.click(
@@ -372,7 +370,7 @@ with gr.Blocks(theme='gradio/soft') as demo:
372
  gr.Markdown("### PDF 1 Analysis")
373
 
374
  selected_paragraph_1 = gr.Textbox(label="Selected Paragraph 1 Content", lines=4)
375
-
376
  summarize_btn1 = gr.Button("Summarize Text from PDF 1")
377
  summary_textbox_1 = gr.Textbox(label="Summary for PDF 1", lines=2)
378
 
@@ -402,7 +400,7 @@ with gr.Blocks(theme='gradio/soft') as demo:
402
  gr.Markdown("### PDF 2 Analysis")
403
 
404
  selected_paragraph_2 = gr.Textbox(label="Selected Paragraph 2 Content", lines=4)
405
-
406
  # Display selected paragraph from PDF 2
407
  selected_paragraph_2.change(fn=show, inputs=paragraph_2_dropdown, outputs=selected_paragraph_2)
408
 
 
304
 
305
  with gr.Blocks(theme='gradio/soft') as demo:
306
  with gr.Row().style(equal_height=True):
 
307
  with gr.Column(scale=3):
308
  with gr.Box():
 
309
  toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
310
 
311
  toggle_dark.click(
 
370
  gr.Markdown("### PDF 1 Analysis")
371
 
372
  selected_paragraph_1 = gr.Textbox(label="Selected Paragraph 1 Content", lines=4)
373
+ paragraph_1_dropdown.select(fn=show, inputs = paragraph_1_dropdown, outputs=selected_paragraph_1)
374
  summarize_btn1 = gr.Button("Summarize Text from PDF 1")
375
  summary_textbox_1 = gr.Textbox(label="Summary for PDF 1", lines=2)
376
 
 
400
  gr.Markdown("### PDF 2 Analysis")
401
 
402
  selected_paragraph_2 = gr.Textbox(label="Selected Paragraph 2 Content", lines=4)
403
+ paragraph_2_dropdown.select(fn=show, inputs = paragraph_2_dropdown, outputs=selected_paragraph_2)
404
  # Display selected paragraph from PDF 2
405
  selected_paragraph_2.change(fn=show, inputs=paragraph_2_dropdown, outputs=selected_paragraph_2)
406