charliebaby2023
commited on
Commit
•
8980225
1
Parent(s):
19aac56
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,18 @@ from all_models import models
|
|
4 |
|
5 |
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
def load_fn(models):
|
8 |
global models_load
|
9 |
models_load = {}
|
@@ -48,7 +60,9 @@ def gen_fn(model_str, prompt):
|
|
48 |
|
49 |
with gr.Blocks() as demo:
|
50 |
with gr.Tab('The Dream'):
|
51 |
-
|
|
|
|
|
52 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
53 |
stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
54 |
gen_button.click(lambda s: gr.update(interactive = True), None, stop_button)
|
|
|
4 |
|
5 |
|
6 |
|
7 |
+
# Function to generate a string with text and a random number
|
8 |
+
def generate_text_with_random_number():
|
9 |
+
random_number = random.randint(1, 100)
|
10 |
+
return f"Prefilled text {random_number}"
|
11 |
+
|
12 |
+
# Function to process the input and return it (or do some other processing)
|
13 |
+
def process_text(input_text):
|
14 |
+
return f"You entered: {input_text}"
|
15 |
+
|
16 |
+
prefilled_text = generate_text_with_random_number()
|
17 |
+
|
18 |
+
|
19 |
def load_fn(models):
|
20 |
global models_load
|
21 |
models_load = {}
|
|
|
60 |
|
61 |
with gr.Blocks() as demo:
|
62 |
with gr.Tab('The Dream'):
|
63 |
+
fn=process_text,
|
64 |
+
txt_input = gr.Textbox(label = 'Your prompt:', lines=4, value=prefilled_text ).style(container=False,min_width=1200)
|
65 |
+
#"nude femboy sissy with small penis, bound anal sex orgy party, perfect penis, oral sex, threesum, head between thighs, glans inside mouth, cuming from glans"
|
66 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
67 |
stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
68 |
gen_button.click(lambda s: gr.update(interactive = True), None, stop_button)
|