DemiPoto commited on
Commit
9638870
·
verified ·
1 Parent(s): 2a78f80

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -5,6 +5,8 @@ from datetime import datetime
5
 
6
  now2 = 0
7
  nb_models=16
 
 
8
  p="DemiPotoPass1988"
9
  test_p=False
10
 
@@ -82,12 +84,12 @@ def choice_group_d(var_Test):
82
  stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
83
  return gen_event
84
 
85
- def test_pass(test_pass):
86
- print(test_pass)
87
- if test_pass==p:
88
  test_p=True
89
  print(test_p)
90
-
91
 
92
  def gen_fn(model_str, prompt):
93
  if model_str == 'NA':
@@ -137,7 +139,7 @@ def make_me():
137
  txt_input_p = gr.Textbox(label='test', lines=1, width=300, max_height=100)
138
 
139
  test_button = gr.Button('test', width=30, height=10)
140
- test_button.click(test_pass,txt_input_p.value)
141
  with gr.Row():
142
  gr.HTML("""
143
  <div class="footer">
 
5
 
6
  now2 = 0
7
  nb_models=16
8
+ global p
9
+ global test_p
10
  p="DemiPotoPass1988"
11
  test_p=False
12
 
 
84
  stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
85
  return gen_event
86
 
87
+ def test_pass(test_pass):
88
+ print(test_pass.value)
89
+ if test_pass.value==p:
90
  test_p=True
91
  print(test_p)
92
+ return test_p
93
 
94
  def gen_fn(model_str, prompt):
95
  if model_str == 'NA':
 
139
  txt_input_p = gr.Textbox(label='test', lines=1, width=300, max_height=100)
140
 
141
  test_button = gr.Button('test', width=30, height=10)
142
+ test_button.click(test_pass,txt_input_p,test_p)
143
  with gr.Row():
144
  gr.HTML("""
145
  <div class="footer">