Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -27,13 +27,18 @@ def generate_image_from_model(prompt):
|
|
27 |
|
28 |
return image_path # Return the path to the image
|
29 |
|
30 |
-
#
|
|
|
|
|
|
|
|
|
|
|
31 |
interface = gr.Interface(
|
32 |
-
fn=
|
33 |
inputs="text",
|
34 |
outputs="image",
|
35 |
-
title="
|
36 |
-
description="Enter a prompt
|
37 |
)
|
38 |
|
39 |
# Launch the interface
|
|
|
27 |
|
28 |
return image_path # Return the path to the image
|
29 |
|
30 |
+
# Define the chatbot function to return the generated image
|
31 |
+
def chatbot(prompt):
|
32 |
+
image = generate_image(prompt)
|
33 |
+
return image
|
34 |
+
|
35 |
+
# Create the Gradio interface with the same UI/UX
|
36 |
interface = gr.Interface(
|
37 |
+
fn=chatbot,
|
38 |
inputs="text",
|
39 |
outputs="image",
|
40 |
+
title="prompthero/openjourney",
|
41 |
+
description="Enter a text prompt and get an AI-generated image."
|
42 |
)
|
43 |
|
44 |
# Launch the interface
|