xp3857 commited on
Commit
370ecfb
1 Parent(s): bd88d47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -33,8 +33,8 @@ models=[
33
  #o = os.getenv("P")
34
  o = "V"
35
 
36
- t_out = gr.HTML.update("""
37
-
38
  <style>
39
  /* Popup container */
40
  .popup {
@@ -90,6 +90,8 @@ t_out = gr.HTML.update("""
90
  }
91
 
92
  </style>
 
 
93
  <div class="popup" onclick="myFunction()">Click me!
94
  <span class="popuptext" id="myPopup">Popup text...</span>
95
  </div>
@@ -100,11 +102,11 @@ function myFunction() {
100
  popup.classList.toggle("show");
101
  }
102
  </script>
 
103
 
104
 
105
 
106
-
107
- """,visible=True)
108
 
109
 
110
  def ac():
@@ -119,7 +121,7 @@ def ac():
119
  ti = time.time()
120
  if ti > ts and stamp != 0:
121
  print("Cancelling")
122
- return gr.update(value=1),t_out
123
  else:
124
  print("Passing")
125
  return gr.update(value=0),None
@@ -136,7 +138,7 @@ def ac():
136
  def cl_fac():
137
  return ""
138
  with gr.Blocks(css=css) as b:
139
- message=gr.HTML("""""", visible=False)
140
  with gr.Row():
141
  put = gr.Textbox()
142
  btn1 = gr.Button()
 
33
  #o = os.getenv("P")
34
  o = "V"
35
 
36
+ t_out = ("""
37
+ <head>
38
  <style>
39
  /* Popup container */
40
  .popup {
 
90
  }
91
 
92
  </style>
93
+ </head>
94
+ <body>
95
  <div class="popup" onclick="myFunction()">Click me!
96
  <span class="popuptext" id="myPopup">Popup text...</span>
97
  </div>
 
102
  popup.classList.toggle("show");
103
  }
104
  </script>
105
+ </body>
106
 
107
 
108
 
109
+ """)
 
110
 
111
 
112
  def ac():
 
121
  ti = time.time()
122
  if ti > ts and stamp != 0:
123
  print("Cancelling")
124
+ return gr.update(value=1),gr.HTML.update(f"{t_out}", visible=True)
125
  else:
126
  print("Passing")
127
  return gr.update(value=0),None
 
138
  def cl_fac():
139
  return ""
140
  with gr.Blocks(css=css) as b:
141
+ message=gr.HTML("", visible=False)
142
  with gr.Row():
143
  put = gr.Textbox()
144
  btn1 = gr.Button()