Spaces:
Running
on
Zero
Running
on
Zero
gokaygokay
commited on
Commit
•
8245707
1
Parent(s):
f37a890
fixer
Browse files- ui_components.py +17 -2
ui_components.py
CHANGED
@@ -119,8 +119,23 @@ def create_interface():
|
|
119 |
|
120 |
def generate_prompt_with_dynamic_seed(*args, **kwargs):
|
121 |
dynamic_seed = random.randint(0, 1000000)
|
122 |
-
|
123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
return [dynamic_seed] + list(result)
|
125 |
|
126 |
generate_button.click(
|
|
|
119 |
|
120 |
def generate_prompt_with_dynamic_seed(*args, **kwargs):
|
121 |
dynamic_seed = random.randint(0, 1000000)
|
122 |
+
|
123 |
+
# Extract the main arguments
|
124 |
+
main_args = args[:22] # Assuming there are 22 main arguments before the next_params
|
125 |
+
|
126 |
+
# Extract next_params
|
127 |
+
next_params = {}
|
128 |
+
for category, fields in prompt_generator.next_data.items():
|
129 |
+
category_params = {}
|
130 |
+
for field in fields:
|
131 |
+
if field in kwargs:
|
132 |
+
category_params[field] = kwargs[field]
|
133 |
+
if category_params:
|
134 |
+
next_params[category] = category_params
|
135 |
+
|
136 |
+
# Call generate_prompt with the correct arguments
|
137 |
+
result = prompt_generator.generate_prompt(dynamic_seed, *main_args, **next_params)
|
138 |
+
|
139 |
return [dynamic_seed] + list(result)
|
140 |
|
141 |
generate_button.click(
|