Spaces:
Runtime error
Runtime error
Commit ·
038ae24
1
Parent(s): 60873be
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,11 +27,15 @@ def process_prompt(prompt):
|
|
| 27 |
image_return = model(prompt)
|
| 28 |
return image_return
|
| 29 |
|
| 30 |
-
# Create a Gradio interface with an input textbox for the prompt and output sections for image and text
|
| 31 |
interface = gradio.Interface(
|
| 32 |
-
fn=
|
| 33 |
-
inputs=gradio.inputs.Textbox(label="Enter
|
| 34 |
-
outputs=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
)
|
| 36 |
|
| 37 |
# Launch the interface
|
|
|
|
| 27 |
image_return = model(prompt)
|
| 28 |
return image_return
|
| 29 |
|
|
|
|
| 30 |
interface = gradio.Interface(
|
| 31 |
+
fn=process_prompt,
|
| 32 |
+
inputs=["text", gradio.inputs.Textbox(label="Enter prompt")],
|
| 33 |
+
outputs=[
|
| 34 |
+
"image", gradio.outputs.Image(label="Generated Image", type="pil"),
|
| 35 |
+
"text", gradio.outputs.Textbox(label="Generated Text")
|
| 36 |
+
],
|
| 37 |
+
title="AlStable Text-to-Image",
|
| 38 |
+
description="Generates an image from a text prompt and provides text response.",
|
| 39 |
)
|
| 40 |
|
| 41 |
# Launch the interface
|