Update app.py
Browse files
app.py
CHANGED
@@ -59,15 +59,6 @@ def infer(prompt, n_samples, steps, scale):
|
|
59 |
i = 0
|
60 |
with context("cuda"):
|
61 |
images = pipe(n_samples*[prompt], guidance_scale=scale, num_inference_steps=steps).images
|
62 |
-
for im in images:
|
63 |
-
name = 'im' + str(i) + '.png'
|
64 |
-
i += 1
|
65 |
-
im.save(name)
|
66 |
-
rmbg = RemoveBg("K74BwTbRWVgpszyvJ8VvXPmv", "error.log")
|
67 |
-
# with open(im) as image_file:
|
68 |
-
# encoded_string = base64.b64encode(image_file.read())
|
69 |
-
im = rmbg.remove_background_from_img_file(name)
|
70 |
-
# images[0].save('output.png')
|
71 |
return images
|
72 |
|
73 |
css = """
|
|
|
59 |
i = 0
|
60 |
with context("cuda"):
|
61 |
images = pipe(n_samples*[prompt], guidance_scale=scale, num_inference_steps=steps).images
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
return images
|
63 |
|
64 |
css = """
|