Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -74,10 +74,15 @@ def generate_image(upload_images, prompt, negative_prompt, style_preset, steps,
|
|
74 |
"seed": seed if seed != 0 else random.randint(1, MAX_SEED)
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
77 |
if style_preset is not None and style_preset in STYLE_PRESETS:
|
78 |
params['style_preset'] = style_preset
|
79 |
|
80 |
-
job = client.photomaker(
|
81 |
res = prodia.wait(job)
|
82 |
|
83 |
if res['status'] == "failed":
|
|
|
74 |
"seed": seed if seed != 0 else random.randint(1, MAX_SEED)
|
75 |
}
|
76 |
|
77 |
+
test_params = {
|
78 |
+
"imageData": [file_to_base64(img) for img in upload_images],
|
79 |
+
"prompt": prompt
|
80 |
+
}
|
81 |
+
|
82 |
if style_preset is not None and style_preset in STYLE_PRESETS:
|
83 |
params['style_preset'] = style_preset
|
84 |
|
85 |
+
job = client.photomaker(test_params)
|
86 |
res = prodia.wait(job)
|
87 |
|
88 |
if res['status'] == "failed":
|