Spaces:
Runtime error
Runtime error
Commit
·
ceb9dfc
1
Parent(s):
9fc7b28
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,6 +38,7 @@ def infer(prompt, api_key):
|
|
| 38 |
# Defaults to k_dpmpp_2m if not specified. Clip Guidance only supports ancestral samplers.
|
| 39 |
# (Available Samplers: ddim, plms, k_euler, k_euler_ancestral, k_heun, k_dpm_2, k_dpm_2_ancestral, k_dpmpp_2s_ancestral, k_lms, k_dpmpp_2m)
|
| 40 |
)
|
|
|
|
| 41 |
for resp in answers:
|
| 42 |
for artifact in resp.artifacts:
|
| 43 |
if artifact.finish_reason == generation.FILTER:
|
|
@@ -46,8 +47,9 @@ def infer(prompt, api_key):
|
|
| 46 |
"Please modify the prompt and try again.")
|
| 47 |
if artifact.type == generation.ARTIFACT_IMAGE:
|
| 48 |
img = Image.open(io.BytesIO(artifact.binary))
|
|
|
|
| 49 |
|
| 50 |
-
return
|
| 51 |
|
| 52 |
css = """
|
| 53 |
.gradio-container {
|
|
|
|
| 38 |
# Defaults to k_dpmpp_2m if not specified. Clip Guidance only supports ancestral samplers.
|
| 39 |
# (Available Samplers: ddim, plms, k_euler, k_euler_ancestral, k_heun, k_dpm_2, k_dpm_2_ancestral, k_dpmpp_2s_ancestral, k_lms, k_dpmpp_2m)
|
| 40 |
)
|
| 41 |
+
results = []
|
| 42 |
for resp in answers:
|
| 43 |
for artifact in resp.artifacts:
|
| 44 |
if artifact.finish_reason == generation.FILTER:
|
|
|
|
| 47 |
"Please modify the prompt and try again.")
|
| 48 |
if artifact.type == generation.ARTIFACT_IMAGE:
|
| 49 |
img = Image.open(io.BytesIO(artifact.binary))
|
| 50 |
+
results.append(img)
|
| 51 |
|
| 52 |
+
return results
|
| 53 |
|
| 54 |
css = """
|
| 55 |
.gradio-container {
|