Kvikontent commited on
Commit
f1c4820
β€’
1 Parent(s): 1a952dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -47,6 +47,7 @@ def query(payload):
47
  print("Unknown Error occurred: ", ex)
48
 
49
  def generate_image_from_prompt(prompt_text):
 
50
  image_bytes = query({"inputs": prompt_text})
51
  img = BytesIO(image_bytes) # Convert to BytesIO stream
52
  pil_img = Image.open(img) # Open the image using PIL library
@@ -55,7 +56,7 @@ def generate_image_from_prompt(prompt_text):
55
  title = "KVIImager 2.0 Demo 🎨"
56
  description = "This app uses Hugging Face AI model to generate an image based on the provided text prompt πŸ–Ό."
57
 
58
- input_prompt = gr.Textbox(label="Enter Prompt πŸ“", placeholder="E.g. 'A peaceful garden with a small cottage'")
59
  output_generated_image = gr.Image(label="Generated Image")
60
 
61
  iface = gr.Interface(
 
47
  print("Unknown Error occurred: ", ex)
48
 
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
 
56
  title = "KVIImager 2.0 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")
61
 
62
  iface = gr.Interface(