Spaces:
Sleeping
Sleeping
rynmurdock
commited on
Commit
·
a436eb7
1
Parent(s):
9c57ca1
fixes
Browse files- app.py +2 -3
- image (96).webp +0 -0
app.py
CHANGED
@@ -144,7 +144,7 @@ def generate_gpu(in_im_embs, prompt='the scene'):
|
|
144 |
|
145 |
def generate(in_im_embs, prompt='the scene'):
|
146 |
output, im_emb = generate_gpu(in_im_embs, prompt)
|
147 |
-
nsfw = maybe_nsfw(output.images[0])
|
148 |
|
149 |
name = str(uuid.uuid4()).replace("-", "")
|
150 |
path = f"/tmp/{name}.png"
|
@@ -552,8 +552,7 @@ for im, txt in [ # TODO more movement
|
|
552 |
]:
|
553 |
tmp_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'text', 'gemb'])
|
554 |
tmp_df['paths'] = [im]
|
555 |
-
image =
|
556 |
-
image = image[len(image)//2]
|
557 |
im_emb = encode_space(image)
|
558 |
|
559 |
tmp_df['embeddings'] = [im_emb.detach().to('cpu')]
|
|
|
144 |
|
145 |
def generate(in_im_embs, prompt='the scene'):
|
146 |
output, im_emb = generate_gpu(in_im_embs, prompt)
|
147 |
+
nsfw = False#maybe_nsfw(output.images[0])
|
148 |
|
149 |
name = str(uuid.uuid4()).replace("-", "")
|
150 |
path = f"/tmp/{name}.png"
|
|
|
552 |
]:
|
553 |
tmp_df = pd.DataFrame(columns=['paths', 'embeddings', 'ips', 'user:rating', 'text', 'gemb'])
|
554 |
tmp_df['paths'] = [im]
|
555 |
+
image = Image.open(im).convert('RGB')
|
|
|
556 |
im_emb = encode_space(image)
|
557 |
|
558 |
tmp_df['embeddings'] = [im_emb.detach().to('cpu')]
|
image (96).webp
DELETED
Binary file (186 kB)
|
|