Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -40,11 +40,13 @@ def info():
|
|
40 |
</head>
|
41 |
|
42 |
<script>
|
43 |
-
|
|
|
44 |
title: "How To Use",
|
45 |
text: "Enter your Gemini API key, upload PDF document, select summary kind, then hit the summarize button",
|
46 |
-
icon: "
|
47 |
});
|
|
|
48 |
</script>
|
49 |
""")
|
50 |
|
@@ -67,7 +69,6 @@ with gr.Blocks(
|
|
67 |
pdf_input = gr.File(file_types=[".pdf"])
|
68 |
summary_type = gr.Radio(["5 Bullet Points","10 Bullet Points", "Paragraph", "Sentence"],value = "5 Bullet Points", label="Select Summary Kind")
|
69 |
|
70 |
-
|
71 |
with gr.Row():
|
72 |
btn = gr.Button("Summarize")
|
73 |
clear_btn = gr.ClearButton(value="Clear")
|
@@ -79,4 +80,4 @@ with gr.Blocks(
|
|
79 |
btn.click(fn=pdfSummarizer, inputs=[api_key, pdf_input, summary_type], outputs=out)
|
80 |
clear_btn.click(lambda: [None,None,"5 Bullet Points",""],inputs=None,outputs=[api_key, pdf_input, summary_type, out],queue=False)
|
81 |
|
82 |
-
app.launch()
|
|
|
40 |
</head>
|
41 |
|
42 |
<script>
|
43 |
+
function alert() {
|
44 |
+
Swal.fire({
|
45 |
title: "How To Use",
|
46 |
text: "Enter your Gemini API key, upload PDF document, select summary kind, then hit the summarize button",
|
47 |
+
icon: "info"
|
48 |
});
|
49 |
+
};
|
50 |
</script>
|
51 |
""")
|
52 |
|
|
|
69 |
pdf_input = gr.File(file_types=[".pdf"])
|
70 |
summary_type = gr.Radio(["5 Bullet Points","10 Bullet Points", "Paragraph", "Sentence"],value = "5 Bullet Points", label="Select Summary Kind")
|
71 |
|
|
|
72 |
with gr.Row():
|
73 |
btn = gr.Button("Summarize")
|
74 |
clear_btn = gr.ClearButton(value="Clear")
|
|
|
80 |
btn.click(fn=pdfSummarizer, inputs=[api_key, pdf_input, summary_type], outputs=out)
|
81 |
clear_btn.click(lambda: [None,None,"5 Bullet Points",""],inputs=None,outputs=[api_key, pdf_input, summary_type, out],queue=False)
|
82 |
|
83 |
+
app.launch(pwa=True)
|