Ifeanyi commited on
Commit
3ab6b75
·
verified ·
1 Parent(s): b1145a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -41,11 +41,11 @@ with gr.Blocks(
41
  ) as app:
42
  gr.Markdown("<center><h2>PDF Summarizer</h2></center>")
43
  with gr.Row():
44
- inp = [
45
- gr.Text(label="Gemini API Key", placeholder="Enter your Google Gemini API key here"),
46
- gr.File(file_types=[".pdf"]),
47
- gr.Radio(["5 Bullet Points","10 Bullet Points", "Paragraph", "Sentence"], label="Select Summary Kind")
48
- ]
49
  with gr.Column():
50
  with gr.Row():
51
  btn = gr.Button("Summarize")
@@ -56,6 +56,6 @@ with gr.Blocks(
56
  out = gr.Markdown()
57
 
58
  btn.click(fn=pdfSummarizer, inputs=inp, outputs=out)
59
- clear_btn.click(lambda: (None,"",""),inputs=[],outputs=[inp,out],queue=False)
60
 
61
  app.launch()
 
41
  ) as app:
42
  gr.Markdown("<center><h2>PDF Summarizer</h2></center>")
43
  with gr.Row():
44
+
45
+ api_key = gr.Text(label="Gemini API Key", placeholder="Enter your Google Gemini API key here"),
46
+ pdf_file = gr.File(file_types=[".pdf"]),
47
+ summary_type = gr.Radio(["5 Bullet Points","10 Bullet Points", "Paragraph", "Sentence"], label="Select Summary Kind")
48
+
49
  with gr.Column():
50
  with gr.Row():
51
  btn = gr.Button("Summarize")
 
56
  out = gr.Markdown()
57
 
58
  btn.click(fn=pdfSummarizer, inputs=inp, outputs=out)
59
+ clear_btn.click(lambda: (None,None,None,""),outputs=[api_key, pdf_input, summary_type, out],queue=False)
60
 
61
  app.launch()