Ifeanyi commited on
Commit
bfe5fed
·
verified ·
1 Parent(s): ec0ee8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -33,19 +33,33 @@ def pdfSummarizer(gemini_api_key, pdf_file, kind):
33
 
34
  # define info function
35
  def info():
36
- gr.Info("Enter your Gemini API key, upload your PDF document, select summary kind, then hit the summarize button")
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  with gr.Blocks(
39
  theme="gstaff/whiteboard",
40
- title="📓 PDF Summarizer 📓",
41
  analytics_enabled=True,
42
  fill_height=True
43
  ) as app:
44
- gr.HTML("<div style='text-align:center;overflow:hidden;'><h2>PDF Summarizer</h2></div>")
45
  with gr.Sidebar(visible=False):
46
  gr.HTML("<div style='text-align:center;overflow:hidden;'><h3>&#128211; PDF Summarizer &#128211;</h3></div>")
47
  gr.HTML("<br>")
 
48
  info_btn = gr.Button("Info")
 
49
  gr.HTML("<div style='text-align:center;overflow:hidden;'><h4>Gemini API Key</h4></div>")
50
  api_key = gr.Text(label = "",placeholder="Enter your Google Gemini API key here")
51
 
 
33
 
34
  # define info function
35
  def info():
36
+ gr.HTML("""
37
+ <head>
38
+ <script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js'></script>
39
+ <link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.css' rel='stylesheet'>
40
+ </head>
41
+
42
+ <script>
43
+ Swal.fire({
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: "question"
47
+ });
48
+ </script>
49
+ """)
50
 
51
  with gr.Blocks(
52
  theme="gstaff/whiteboard",
 
53
  analytics_enabled=True,
54
  fill_height=True
55
  ) as app:
56
+ gr.HTML("<div style='text-align:center;overflow:hidden;'><h2>&#128211; PDF Summarizer &#128211;</h2></div>")
57
  with gr.Sidebar(visible=False):
58
  gr.HTML("<div style='text-align:center;overflow:hidden;'><h3>&#128211; PDF Summarizer &#128211;</h3></div>")
59
  gr.HTML("<br>")
60
+ gr.HTML("<div style='text-align:center;overflow:hidden;'")
61
  info_btn = gr.Button("Info")
62
+ gr.HTML("</div>")
63
  gr.HTML("<div style='text-align:center;overflow:hidden;'><h4>Gemini API Key</h4></div>")
64
  api_key = gr.Text(label = "",placeholder="Enter your Google Gemini API key here")
65