Ifeanyi commited on
Commit
b755808
·
verified ·
1 Parent(s): a2b41af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -45,6 +45,21 @@ with gr.Blocks(
45
  <script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js'></script>
46
  <link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.css' rel='stylesheet'>
47
  """)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  # Button with Javascript Event
50
  gr.HTML("""
@@ -52,8 +67,14 @@ with gr.Blocks(
52
  <button onclick="Swal.fire({
53
  title: 'How To Use',
54
  text: 'Enter your Gemini API key, upload PDF document, select summary kind, then hit the summarize button',
55
- timer: 5000});"
56
- style="padding: 10px; background-color: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer;">
 
 
 
 
 
 
57
  Info
58
  </button>
59
  </div>
 
45
  <script src='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.all.min.js'></script>
46
  <link href='https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.css' rel='stylesheet'>
47
  """)
48
+ # styling for alert popup
49
+ gr.HTML("""
50
+ <head>
51
+ <style>
52
+ .prompt-title {
53
+ font-family: "JetBrains Mono",monospace;
54
+ font-size: 20px;
55
+ }
56
+
57
+ .prompt-popup {
58
+ background-color: black;
59
+ }
60
+ </style>
61
+ </head>
62
+ """)
63
 
64
  # Button with Javascript Event
65
  gr.HTML("""
 
67
  <button onclick="Swal.fire({
68
  title: 'How To Use',
69
  text: 'Enter your Gemini API key, upload PDF document, select summary kind, then hit the summarize button',
70
+ confirmButtonColor: 'black',
71
+ timer: 7000,
72
+ customClass: {
73
+ title: "prompt-title",
74
+ popup: "prompt-popup"
75
+ }
76
+ });"
77
+ style="padding: 20px; background-color: #black; color: white; border: none; border-radius: 5px; cursor: pointer;">
78
  Info
79
  </button>
80
  </div>