Kvikontent commited on
Commit
d3b342b
·
verified ·
1 Parent(s): 85afc3f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -49,12 +49,12 @@ def query(payload):
49
  def generate_image_from_prompt(prompt_text):
50
  gr.Info("Image generation started")
51
  image_bytes = query({"inputs": prompt_text})
52
- img = BytesIO(image_bytes) # Convert to BytesIO stream
53
- pil_img = Image.open(img) # Open the image using PIL library
54
- return pil_img # Return the converted PIL image
55
 
56
  title = "BUlatnaya V1 Demo 🎨"
57
- description = "This app uses Hugging Face AI model to generate an image based on the provided text prompt 🖼."
58
 
59
  input_prompt = gr.Textbox(label="Enter Prompt 📝", placeholder="E.g. 'Astronaut riding a horse'")
60
  output_generated_image = gr.Image(label="Generated Image")
 
49
  def generate_image_from_prompt(prompt_text):
50
  gr.Info("Image generation started")
51
  image_bytes = query({"inputs": prompt_text})
52
+ img = BytesIO(image_bytes)
53
+ pil_img = Image.open(img)
54
+ return pil_img
55
 
56
  title = "BUlatnaya V1 Demo 🎨"
57
+ description = "This app uses Hugging Face AI model to generate an image based on the provided text prompt 🖼. No nudes accepted!"
58
 
59
  input_prompt = gr.Textbox(label="Enter Prompt 📝", placeholder="E.g. 'Astronaut riding a horse'")
60
  output_generated_image = gr.Image(label="Generated Image")