DemiPoto commited on
Commit
ac589ef
·
verified ·
1 Parent(s): 694af55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -9
app.py CHANGED
@@ -5,9 +5,7 @@ from datetime import datetime
5
 
6
  now2 = 0
7
  nb_models=16
8
- global p
9
  global test_p
10
- p="DemiPotoPass1988"
11
  test_p=False
12
 
13
  def split_models(models,nb_models):
@@ -84,11 +82,10 @@ def choice_group_d(var_Test):
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)
89
- if test_pass==p:
90
- test_p=True
91
- print(test_p)
92
 
93
  def gen_fn(model_str, prompt):
94
  if model_str == 'NA':
@@ -130,7 +127,7 @@ def make_me():
130
  group_model_choice = gr.CheckboxGroup(models_test, label=f' {len(models_test)} different group models', value=1, multiselect=False, max_choices=1, interactive=True, filterable=False)
131
  """
132
  with gr.Accordion("test", open=True):
133
- group_model_choice = gr.Dropdown(label="test Model", show_label=False, choices=list(models_test) , allow_custom_value=True)
134
  group_model_choice.change(choice_group_b,group_model_choice,output)
135
  group_model_choice.change(choice_group_c,group_model_choice,current_models)
136
  """group_model_choice.change(choice_group_d,(gen_button,stop_button,output,current_models),gen_event)"""
@@ -138,7 +135,7 @@ def make_me():
138
  txt_input_p = gr.Textbox(label='test', lines=1, width=300, max_height=100)
139
 
140
  test_button = gr.Button('test', width=30, height=10)
141
- test_button.click(test_pass,txt_input_p)
142
  with gr.Row():
143
  gr.HTML("""
144
  <div class="footer">
 
5
 
6
  now2 = 0
7
  nb_models=16
 
8
  global test_p
 
9
  test_p=False
10
 
11
  def split_models(models,nb_models):
 
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):
86
+ print(test)
87
+ if test==p:
88
+ return = gr.Dropdown(label="test Model", show_label=False, choices=list(models_test) , allow_custom_value=True)
 
89
 
90
  def gen_fn(model_str, prompt):
91
  if model_str == 'NA':
 
127
  group_model_choice = gr.CheckboxGroup(models_test, label=f' {len(models_test)} different group models', value=1, multiselect=False, max_choices=1, interactive=True, filterable=False)
128
  """
129
  with gr.Accordion("test", open=True):
130
+ group_model_choice = gr.Dropdown(label="test Model", show_label=False, choices=list([]) , allow_custom_value=True)
131
  group_model_choice.change(choice_group_b,group_model_choice,output)
132
  group_model_choice.change(choice_group_c,group_model_choice,current_models)
133
  """group_model_choice.change(choice_group_d,(gen_button,stop_button,output,current_models),gen_event)"""
 
135
  txt_input_p = gr.Textbox(label='test', lines=1, width=300, max_height=100)
136
 
137
  test_button = gr.Button('test', width=30, height=10)
138
+ test_button.click(test_pass,txt_input_pgroup_model_choice)
139
  with gr.Row():
140
  gr.HTML("""
141
  <div class="footer">