Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -59,22 +59,13 @@ def choice_group_c(group_model_choice):
|
|
| 59 |
choice=choice_group_a(group_model_choice)
|
| 60 |
return [gr.Textbox(m, visible=False) for m in choice]
|
| 61 |
|
| 62 |
-
def
|
| 63 |
(gen_button,stop_button,output,current_models)=var_Test
|
| 64 |
for m, o in zip(current_models, output):
|
| 65 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
| 66 |
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 67 |
return gen_event
|
| 68 |
|
| 69 |
-
def def_test(var_Test):
|
| 70 |
-
(gen_button,stop_button,group_model_choice)=var_Test
|
| 71 |
-
choice=choice_group_a(group_model_choice)
|
| 72 |
-
current_models=choice_group_c(choice)
|
| 73 |
-
output=choice_group_b(choice)
|
| 74 |
-
for m, o in zip(current_models, output):
|
| 75 |
-
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
| 76 |
-
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 77 |
-
return (current_models,output)
|
| 78 |
|
| 79 |
def gen_fn(model_str, prompt):
|
| 80 |
if model_str == 'NA':
|
|
|
|
| 59 |
choice=choice_group_a(group_model_choice)
|
| 60 |
return [gr.Textbox(m, visible=False) for m in choice]
|
| 61 |
|
| 62 |
+
def choice_group_d(var_Test):
|
| 63 |
(gen_button,stop_button,output,current_models)=var_Test
|
| 64 |
for m, o in zip(current_models, output):
|
| 65 |
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
| 66 |
stop_button.click(lambda s: gr.update(interactive=False), None, stop_button, cancels=[gen_event])
|
| 67 |
return gen_event
|
| 68 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
def gen_fn(model_str, prompt):
|
| 71 |
if model_str == 'NA':
|