Spaces:
Sleeping
Sleeping
Kvikontent
commited on
Update app.py
Browse files
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. '
|
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(
|