Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,11 +27,11 @@ mingle_model = MingleModel()
|
|
27 |
|
28 |
def mingle_prompts(first_prompt, second_prompt):
|
29 |
imgs = []
|
30 |
-
text_input1 = mingle_model.
|
31 |
-
text_input2 = mingle_model.
|
32 |
with torch.no_grad():
|
33 |
-
text_embeddings1 = mingle_model.
|
34 |
-
text_embeddings2 = mingle_model.
|
35 |
|
36 |
rand_generator = random.randint(1, 2048)
|
37 |
# Mix them together
|
@@ -52,7 +52,7 @@ def mingle_prompts(first_prompt, second_prompt):
|
|
52 |
with gr.Blocks() as demo:
|
53 |
gr.Markdown(
|
54 |
'''
|
55 |
-
<p style="text-align: center;">
|
56 |
''')
|
57 |
gr.Image('batman_venum.png', shape=(1024, 205))
|
58 |
|
|
|
27 |
|
28 |
def mingle_prompts(first_prompt, second_prompt):
|
29 |
imgs = []
|
30 |
+
text_input1 = mingle_model.do_tokenizer(first_prompt)
|
31 |
+
text_input2 = mingle_model.do_tokenizer(second_prompt)
|
32 |
with torch.no_grad():
|
33 |
+
text_embeddings1 = mingle_model.get_text_encoder(text_input1)
|
34 |
+
text_embeddings2 = mingle_model.get_text_encoder(text_input2)
|
35 |
|
36 |
rand_generator = random.randint(1, 2048)
|
37 |
# Mix them together
|
|
|
52 |
with gr.Blocks() as demo:
|
53 |
gr.Markdown(
|
54 |
'''
|
55 |
+
<p style="text-align: center;">create a 'chimera' by averaging the embeddings of two different prompts!!</p>
|
56 |
''')
|
57 |
gr.Image('batman_venum.png', shape=(1024, 205))
|
58 |
|