JatinkInnovision commited on
Commit
9648b26
·
verified ·
1 Parent(s): 39b2e24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -11,6 +11,7 @@ is_dekcib_alive = False
11
  clean_link = "149.165.152.222:3000"
12
  full_url = f"http://{clean_link}"
13
 
 
14
  GREEN_FLASHING_LINK = f"""
15
  <style>
16
  @keyframes flash {{
@@ -20,17 +21,17 @@ GREEN_FLASHING_LINK = f"""
20
  }}
21
  .flashing-btn {{
22
  display: inline-block;
23
- padding: 20px 40px;
24
- font-size: 26px;
25
  font-weight: 900;
26
  text-decoration: none;
27
  color: black !important;
28
  background-color: #39FF14;
29
- border: 5px solid black;
30
- border-radius: 4px;
31
  text-align: center;
32
  animation: flash 1s infinite;
33
- box-shadow: 0 0 20px #39FF14;
34
  transition: transform 0.2s;
35
  }}
36
  .flashing-btn:hover {{
@@ -39,9 +40,9 @@ GREEN_FLASHING_LINK = f"""
39
  opacity: 1;
40
  }}
41
  </style>
42
- <div style="text-align: center; margin: 30px 0;">
43
  <a href="{full_url}" target="_blank" class="flashing-btn">
44
- CLICK HERE FOR DE-KCIB INNOVISION
45
  </a>
46
  </div>
47
  """
@@ -154,12 +155,13 @@ setInterval(function() {
154
  </script>
155
  """
156
 
 
157
  with gr.Blocks(title="De-KCIB Access Portal") as demo:
158
  gr.HTML(combined_js)
159
  session_tracker = gr.State(value="active", delete_callback=user_left)
160
 
161
- gr.Markdown("#De-KCIB (Deep Knowledge Center for Injury Biomechanics)")
162
- gr.Markdown("### Biomechanics Knowledge-based Conversational Agent by Innovision")
163
 
164
  with gr.Row():
165
  live_status = gr.Textbox(label="Jetstream2 Instance Status", interactive=False)
@@ -199,12 +201,10 @@ with gr.Blocks(title="De-KCIB Access Portal") as demo:
199
  gr.Image("logo2.png", show_label=False, interactive=False, container=False, scale=1)
200
  gr.Image("logo3.png", show_label=False, interactive=False, container=False, scale=1)
201
 
202
- # REPLACEMENT AUTO-REFRESH LOGIC
203
- # Initialize the status on load
204
  demo.load(fn=user_joined, outputs=user_display)
205
  demo.load(fn=get_current_status, outputs=[live_status, user_display, link_box])
206
 
207
- # Setup a recurring timer for 5 seconds
208
  status_timer = gr.Timer(5)
209
  status_timer.tick(fn=get_current_status, outputs=[live_status, user_display, link_box])
210
 
 
11
  clean_link = "149.165.152.222:3000"
12
  full_url = f"http://{clean_link}"
13
 
14
+ # Styled HTML - Text changed to "Click here for De-KCIB Copilot"
15
  GREEN_FLASHING_LINK = f"""
16
  <style>
17
  @keyframes flash {{
 
21
  }}
22
  .flashing-btn {{
23
  display: inline-block;
24
+ padding: 30px 60px; /* Bigger padding */
25
+ font-size: 32px; /* Bigger font */
26
  font-weight: 900;
27
  text-decoration: none;
28
  color: black !important;
29
  background-color: #39FF14;
30
+ border: 6px solid black;
31
+ border-radius: 8px;
32
  text-align: center;
33
  animation: flash 1s infinite;
34
+ box-shadow: 0 0 30px #39FF14;
35
  transition: transform 0.2s;
36
  }}
37
  .flashing-btn:hover {{
 
40
  opacity: 1;
41
  }}
42
  </style>
43
+ <div style="text-align: center; margin: 40px 0;">
44
  <a href="{full_url}" target="_blank" class="flashing-btn">
45
+ Click here for De-KCIB Copilot
46
  </a>
47
  </div>
48
  """
 
155
  </script>
156
  """
157
 
158
+ # Text made larger using HTML tags and removed leading #
159
  with gr.Blocks(title="De-KCIB Access Portal") as demo:
160
  gr.HTML(combined_js)
161
  session_tracker = gr.State(value="active", delete_callback=user_left)
162
 
163
+ gr.HTML("<h1 style='font-size: 42px; text-align: center;'>De-KCIB (Deep Knowledge Center for Injury Biomechanics)</h1>")
164
+ gr.HTML("<h3 style='font-size: 24px; text-align: center;'>Biomechanics Knowledge-based Conversational Agent by Innovision</h3>")
165
 
166
  with gr.Row():
167
  live_status = gr.Textbox(label="Jetstream2 Instance Status", interactive=False)
 
201
  gr.Image("logo2.png", show_label=False, interactive=False, container=False, scale=1)
202
  gr.Image("logo3.png", show_label=False, interactive=False, container=False, scale=1)
203
 
204
+ # Status logic
 
205
  demo.load(fn=user_joined, outputs=user_display)
206
  demo.load(fn=get_current_status, outputs=[live_status, user_display, link_box])
207
 
 
208
  status_timer = gr.Timer(5)
209
  status_timer.tick(fn=get_current_status, outputs=[live_status, user_display, link_box])
210