Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -109,7 +109,7 @@ css = """
|
|
| 109 |
def process_request(logo_request, width, height, guidance_scale):
|
| 110 |
improved_prompt = generate_improved_prompt(logo_request)
|
| 111 |
image, image_url = generate_image(improved_prompt, width, height, guidance_scale)
|
| 112 |
-
return image
|
| 113 |
|
| 114 |
with gr.Blocks(css=css) as app:
|
| 115 |
with gr.Row():
|
|
@@ -124,25 +124,22 @@ with gr.Blocks(css=css) as app:
|
|
| 124 |
gr.HTML("<h1><center>Magical AI Logo Generator</h1><center>")
|
| 125 |
generate_button = gr.Button("Generate")
|
| 126 |
image_output = gr.Image(label="Generated Logo")
|
| 127 |
-
url_output = gr.Textbox(label="Image URL", interactive=False, visible=False)
|
| 128 |
-
prompt_output = gr.Textbox(label="Generated Prompt", interactive=False, visible=False)
|
| 129 |
-
size_output = gr.Textbox(label="Image Size", interactive=False, visible=False)
|
| 130 |
-
guidance_output = gr.Textbox(label="Guidance Scale", interactive=False, visible=False)
|
| 131 |
generate_button.click(
|
| 132 |
fn=process_request,
|
| 133 |
inputs=[logo_input, width, height, guidance_scale],
|
| 134 |
-
outputs=[image_output
|
| 135 |
)
|
|
|
|
| 136 |
with gr.Row():
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
gr.Markdown("""
|
| 147 |
---
|
| 148 |
### Meta Information
|
|
|
|
| 109 |
def process_request(logo_request, width, height, guidance_scale):
|
| 110 |
improved_prompt = generate_improved_prompt(logo_request)
|
| 111 |
image, image_url = generate_image(improved_prompt, width, height, guidance_scale)
|
| 112 |
+
return image
|
| 113 |
|
| 114 |
with gr.Blocks(css=css) as app:
|
| 115 |
with gr.Row():
|
|
|
|
| 124 |
gr.HTML("<h1><center>Magical AI Logo Generator</h1><center>")
|
| 125 |
generate_button = gr.Button("Generate")
|
| 126 |
image_output = gr.Image(label="Generated Logo")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
generate_button.click(
|
| 128 |
fn=process_request,
|
| 129 |
inputs=[logo_input, width, height, guidance_scale],
|
| 130 |
+
outputs=[image_output]
|
| 131 |
)
|
| 132 |
+
|
| 133 |
with gr.Row():
|
| 134 |
+
gr.HTML("<h2>Generated Examples</h2>")
|
| 135 |
+
gr.Markdown("""
|
| 136 |
+
| **Preview Image** | **Used Prompt** | **Size** | **Guidance Scale** |
|
| 137 |
+
|-------------------|--------------------------------|-----------|--------------------|
|
| 138 |
+
|  | Coffeeshop website logo | 1024x1024 | 3 |
|
| 139 |
+
|  | Bio food website logo | 1024x1024 | 3 |
|
| 140 |
+
|  | Car seller website logo | 1024x1024 | 3 |
|
| 141 |
+
""")
|
| 142 |
+
|
| 143 |
gr.Markdown("""
|
| 144 |
---
|
| 145 |
### Meta Information
|