Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
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,
|
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()
|