Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from random import randint
|
3 |
from all_models import models
|
|
|
|
|
|
|
4 |
|
5 |
def load_fn(models):
|
6 |
global models_load
|
@@ -44,7 +47,7 @@ with gr.Blocks() as demo:
|
|
44 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
45 |
|
46 |
|
47 |
-
txt_input = gr.Textbox(label = 'Prompt text')
|
48 |
gen_button = gr.Button('Generate')
|
49 |
stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
50 |
gen_button.click(lambda s: gr.update(interactive = True), None, stop_button)
|
@@ -62,7 +65,7 @@ with gr.Blocks() as demo:
|
|
62 |
|
63 |
with gr.Tab('Single model'):
|
64 |
model_choice2 = gr.Dropdown(models, label = 'Choose model', value = models[0], filterable = False)
|
65 |
-
txt_input2 = gr.Textbox(label = 'Prompt text')
|
66 |
|
67 |
max_images = 16
|
68 |
num_images = gr.Slider(1, max_images, value = max_images, step = 1, label = 'Number of images')
|
|
|
1 |
import gradio as gr
|
2 |
from random import randint
|
3 |
from all_models import models
|
4 |
+
from _prompt import thePrompt
|
5 |
+
|
6 |
+
preSetPrompt = thePrompt
|
7 |
|
8 |
def load_fn(models):
|
9 |
global models_load
|
|
|
47 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
48 |
|
49 |
|
50 |
+
txt_input = gr.Textbox(label = 'Prompt text', value=preSetPrompt)
|
51 |
gen_button = gr.Button('Generate')
|
52 |
stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
53 |
gen_button.click(lambda s: gr.update(interactive = True), None, stop_button)
|
|
|
65 |
|
66 |
with gr.Tab('Single model'):
|
67 |
model_choice2 = gr.Dropdown(models, label = 'Choose model', value = models[0], filterable = False)
|
68 |
+
txt_input2 = gr.Textbox(label = 'Prompt text', value=preSetPrompt)
|
69 |
|
70 |
max_images = 16
|
71 |
num_images = gr.Slider(1, max_images, value = max_images, step = 1, label = 'Number of images')
|