JatinkInnovision commited on
Commit
1bb97ca
·
verified ·
1 Parent(s): 339df26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -12,6 +12,7 @@ clean_link = "comfit-copilot.mch250095.projects.jetstream-cloud.org:3000"
12
  full_url = f"http://{clean_link}"
13
 
14
  # Styled HTML for a flashing neon green block with black text
 
15
  GREEN_FLASHING_LINK = f"""
16
  <style>
17
  @keyframes flash {{
@@ -30,7 +31,7 @@ GREEN_FLASHING_LINK = f"""
30
  border: 5px solid black;
31
  border-radius: 4px;
32
  text-align: center;
33
- # animation: flash 1s infinite;
34
  box-shadow: 0 0 20px #39FF14;
35
  transition: transform 0.2s;
36
  }}
@@ -48,6 +49,7 @@ GREEN_FLASHING_LINK = f"""
48
  """
49
 
50
  def get_conn():
 
51
  return openstack.connect(
52
  auth_url=os.getenv("OS_AUTH_URL"),
53
  application_credential_id=os.getenv("OS_APPLICATION_CREDENTIAL_ID"),
@@ -153,7 +155,7 @@ setInterval(function() {
153
  </script>
154
  """
155
 
156
- with gr.Blocks() as demo:
157
  gr.HTML(combined_js)
158
  session_tracker = gr.State(value="active", delete_callback=user_left)
159
 
@@ -195,7 +197,6 @@ with gr.Blocks() as demo:
195
 
196
  # Logo Footer Section
197
  gr.Markdown("---")
198
- # UPDATED SUPPORTERS TEXT
199
  gr.Markdown("<center><h3>Thanks to our supporters & collaborators:</h3></center>")
200
  with gr.Row():
201
  gr.Image("logo1.png", show_label=False, interactive=False, container=False, scale=1)
@@ -213,4 +214,4 @@ with gr.Blocks() as demo:
213
  demo.load(fn=get_current_status, outputs=[live_status, user_display, link_box])
214
 
215
  if __name__ == "__main__":
216
- demo.launch(theme=gr.themes.Soft())
 
12
  full_url = f"http://{clean_link}"
13
 
14
  # Styled HTML for a flashing neon green block with black text
15
+ # FIX: Uncommented the animation line to enable flashing
16
  GREEN_FLASHING_LINK = f"""
17
  <style>
18
  @keyframes flash {{
 
31
  border: 5px solid black;
32
  border-radius: 4px;
33
  text-align: center;
34
+ animation: flash 1s infinite;
35
  box-shadow: 0 0 20px #39FF14;
36
  transition: transform 0.2s;
37
  }}
 
49
  """
50
 
51
  def get_conn():
52
+ """Authenticates with Jetstream2 (OpenStack) using Application Credentials."""
53
  return openstack.connect(
54
  auth_url=os.getenv("OS_AUTH_URL"),
55
  application_credential_id=os.getenv("OS_APPLICATION_CREDENTIAL_ID"),
 
155
  </script>
156
  """
157
 
158
+ with gr.Blocks(theme=gr.themes.Soft()) as demo:
159
  gr.HTML(combined_js)
160
  session_tracker = gr.State(value="active", delete_callback=user_left)
161
 
 
197
 
198
  # Logo Footer Section
199
  gr.Markdown("---")
 
200
  gr.Markdown("<center><h3>Thanks to our supporters & collaborators:</h3></center>")
201
  with gr.Row():
202
  gr.Image("logo1.png", show_label=False, interactive=False, container=False, scale=1)
 
214
  demo.load(fn=get_current_status, outputs=[live_status, user_display, link_box])
215
 
216
  if __name__ == "__main__":
217
+ demo.launch()