charliebaby2023
commited on
Commit
•
89c5f18
1
Parent(s):
b6fedff
Update app.py
Browse files
app.py
CHANGED
@@ -1,38 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
-
import
|
3 |
from all_models import models
|
4 |
from datetime import datetime
|
5 |
|
6 |
def get_current_time():
|
7 |
-
# Get the current time
|
8 |
now = datetime.now()
|
9 |
-
# Format the time as a string
|
10 |
-
|
11 |
current_time = now.strftime("%Y-%m-%d %H:%M:%S")
|
12 |
kii = "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"
|
13 |
ki=f'{kii} {current_time}'
|
14 |
return ki
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
# Function to generate a string with text and a random number
|
21 |
-
def generate_text_with_random_number():
|
22 |
-
#random_number = randint(1, 100)
|
23 |
-
kii = "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"
|
24 |
-
ki=f'{kii} {random.randint(1,100)}'
|
25 |
-
return ki
|
26 |
-
|
27 |
-
# Function to process the input and return it (or do some other processing)
|
28 |
-
def process_text(input_text):
|
29 |
-
return f"You entered: {input_text}"
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
def load_fn(models):
|
35 |
-
|
36 |
global models_load
|
37 |
models_load = {}
|
38 |
|
@@ -46,9 +25,6 @@ def load_fn(models):
|
|
46 |
|
47 |
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
load_fn(models)
|
53 |
|
54 |
|
@@ -74,21 +50,12 @@ def gen_fn(model_str, prompt):
|
|
74 |
|
75 |
|
76 |
|
77 |
-
|
78 |
-
|
79 |
def make_me():
|
80 |
with gr.Tab('The Dream'):
|
81 |
-
|
82 |
-
txt_input = gr.Textbox(label = 'Your prompt:', lines=4, value=get_current_time() ).style(container=False,min_width=1200)
|
83 |
-
#"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"
|
84 |
-
|
85 |
-
time_textbox = gr.Textbox(label="Current Time",value='ffff')
|
86 |
-
refresh_button = gr.Button("Refresh Time")
|
87 |
-
refresh_button.click(fn=get_current_time, outputs=time_textbox)
|
88 |
-
|
89 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
90 |
-
stop_button = gr.Button('Stop', variant = 'secondary', interactive =
|
91 |
-
gen_button.click(lambda s: gr.update(interactive = True
|
92 |
gr.HTML(
|
93 |
"""
|
94 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
@@ -106,7 +73,7 @@ def make_me():
|
|
106 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
107 |
|
108 |
for m, o in zip(current_models, output):
|
109 |
-
gen_event = gen_button.click(gen_fn, [m,
|
110 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
111 |
with gr.Accordion('Model selection'):
|
112 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models from the 800 available!', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
@@ -121,9 +88,17 @@ def make_me():
|
|
121 |
"""
|
122 |
)
|
123 |
|
|
|
124 |
with gr.Blocks() as demo:
|
125 |
make_me()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
|
128 |
-
demo.queue(concurrency_count = 200)
|
129 |
-
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
+
from random import randint
|
3 |
from all_models import models
|
4 |
from datetime import datetime
|
5 |
|
6 |
def get_current_time():
|
|
|
7 |
now = datetime.now()
|
|
|
|
|
8 |
current_time = now.strftime("%Y-%m-%d %H:%M:%S")
|
9 |
kii = "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"
|
10 |
ki=f'{kii} {current_time}'
|
11 |
return ki
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
def load_fn(models):
|
|
|
15 |
global models_load
|
16 |
models_load = {}
|
17 |
|
|
|
25 |
|
26 |
|
27 |
|
|
|
|
|
|
|
28 |
load_fn(models)
|
29 |
|
30 |
|
|
|
50 |
|
51 |
|
52 |
|
|
|
|
|
53 |
def make_me():
|
54 |
with gr.Tab('The Dream'):
|
55 |
+
txt_input = gr.Textbox(label = 'Your prompt:', lines=4).style(container=False,min_width=1200)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
gen_button = gr.Button('Generate up to 6 images in up to 3 minutes total')
|
57 |
+
stop_button = gr.Button('Stop', variant = 'secondary', interactive = False)
|
58 |
+
gen_button.click(lambda s: gr.update(interactive = True), None, stop_button)
|
59 |
gr.HTML(
|
60 |
"""
|
61 |
<div style="text-align: center; max-width: 1200px; margin: 0 auto;">
|
|
|
73 |
current_models = [gr.Textbox(m, visible = False) for m in default_models]
|
74 |
|
75 |
for m, o in zip(current_models, output):
|
76 |
+
gen_event = gen_button.click(gen_fn, [m, txt_input], o)
|
77 |
stop_button.click(lambda s: gr.update(interactive = False), None, stop_button, cancels = [gen_event])
|
78 |
with gr.Accordion('Model selection'):
|
79 |
model_choice = gr.CheckboxGroup(models, label = f'Choose up to {num_models} different models from the 800 available!', value = default_models, multiselect = True, max_choices = num_models, interactive = True, filterable = False)
|
|
|
88 |
"""
|
89 |
)
|
90 |
|
91 |
+
|
92 |
with gr.Blocks() as demo:
|
93 |
make_me()
|
94 |
+
|
95 |
+
demo.queue(concurrency_count = 200)
|
96 |
+
demo.launch()
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
|
101 |
+
|
102 |
+
|
103 |
|
104 |
|
|
|
|