JustForFunn commited on
Commit
038ae24
·
1 Parent(s): 60873be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
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=lambda prompt: (process_prompt(prompt), generate_text(prompt)),
33
- inputs=gradio.inputs.Textbox(label="Enter Prompt"),
34
- outputs=[gradio.outputs.Image(label="Generated Image"), gradio.outputs.Textbox(label="Generated Text")]
 
 
 
 
 
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