Update app.py
Browse files
app.py
CHANGED
@@ -36,9 +36,11 @@ def update_imgbox(choices):
|
|
36 |
choices_plus = extend_choices(choices)
|
37 |
return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choices_plus]
|
38 |
|
39 |
-
def gen_fn(model_str, prompt):
|
40 |
if model_str == 'NA':
|
41 |
return None
|
|
|
|
|
42 |
noise = str(randint(0, 9999))
|
43 |
return models_load[model_str](f'{prompt} {noise} {neg_prompt}')
|
44 |
|
|
|
36 |
choices_plus = extend_choices(choices)
|
37 |
return [gr.Image(None, label=m, visible=(m != 'NA')) for m in choices_plus]
|
38 |
|
39 |
+
def gen_fn(model_str, prompt, neg_prompt=None):
|
40 |
if model_str == 'NA':
|
41 |
return None
|
42 |
+
if neg_prompt is None:
|
43 |
+
neg_prompt = 'negative prompt'
|
44 |
noise = str(randint(0, 9999))
|
45 |
return models_load[model_str](f'{prompt} {noise} {neg_prompt}')
|
46 |
|