Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,12 +12,18 @@ def generate_image(prompt):
|
|
12 |
def chatbot(prompt):
|
13 |
# Generate the image based on the user's input
|
14 |
image = generate_image(prompt)
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
return image
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# Create the Gradio interface
|
22 |
interface = gr.Interface(
|
23 |
fn=chatbot,
|
|
|
12 |
def chatbot(prompt):
|
13 |
# Generate the image based on the user's input
|
14 |
image = generate_image(prompt)
|
|
|
|
|
|
|
|
|
15 |
return image
|
16 |
|
17 |
+
def get_aug_embed(self, text_embeds, image):
|
18 |
+
if text_embeds is None:
|
19 |
+
text_embeds = self.text_encoder(
|
20 |
+
text_embeds=text_embeds,
|
21 |
+
image=image,
|
22 |
+
height=self.unet.config.sample_size,
|
23 |
+
width=self.unet.config.sample_size,
|
24 |
+
)
|
25 |
+
return text_embeds
|
26 |
+
|
27 |
# Create the Gradio interface
|
28 |
interface = gr.Interface(
|
29 |
fn=chatbot,
|