Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,25 +7,13 @@ def generate_image_predictions(prompt):
|
|
| 7 |
return images
|
| 8 |
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
iface = gr.Interface(
|
| 11 |
-
gr.Markdown(
|
| 12 |
-
"""
|
| 13 |
-
# Map Diffuser π
|
| 14 |
-
Examples table:
|
| 15 |
-
| Prompt | Output |
|
| 16 |
-
| --- | --- |
|
| 17 |
-
| Satellite image of amsterdam with industrial area and highways | <img src="https://i.imgur.com/vrGpk45.png" width="300" /> |
|
| 18 |
-
| Watercolor style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/AQS34dk.png" width="300" /> |
|
| 19 |
-
| Toner style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/X8VcezT.png" width="300" /> |
|
| 20 |
-
| Satellite image with forests and residential, no water | <img src="https://i.imgur.com/MEccHdM.png" width="300" /> |
|
| 21 |
"""
|
| 22 |
-
|
| 23 |
-
fn=generate_image_predictions,
|
| 24 |
-
inputs=gr.components.Textbox(label="Enter a text prompt here"),
|
| 25 |
-
outputs=gr.components.Image(label="Output Image"),
|
| 26 |
|
| 27 |
-
title="π Map Diffuser",
|
| 28 |
-
description="""
|
| 29 |
π Generates images from a given text prompt. The prompts are in the format:
|
| 30 |
`{style} map of {city} with {features}` or
|
| 31 |
`satellite image of {city} with {features}` or
|
|
@@ -38,7 +26,18 @@ iface = gr.Interface(
|
|
| 38 |
- "Watercolor style map of Amsterdam with residential area and highways"
|
| 39 |
- "Toner style map of Amsterdam with residential area and highways"
|
| 40 |
- "Satellite image with forests and residential, no water"
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
)
|
| 43 |
|
| 44 |
iface.launch()
|
|
|
|
| 7 |
return images
|
| 8 |
|
| 9 |
|
| 10 |
+
iface = gr.Blocks()
|
| 11 |
+
|
| 12 |
+
|
| 13 |
iface = gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"""
|
| 15 |
+
# π Map Diffuser
|
|
|
|
|
|
|
|
|
|
| 16 |
|
|
|
|
|
|
|
| 17 |
π Generates images from a given text prompt. The prompts are in the format:
|
| 18 |
`{style} map of {city} with {features}` or
|
| 19 |
`satellite image of {city} with {features}` or
|
|
|
|
| 26 |
- "Watercolor style map of Amsterdam with residential area and highways"
|
| 27 |
- "Toner style map of Amsterdam with residential area and highways"
|
| 28 |
- "Satellite image with forests and residential, no water"
|
| 29 |
+
|
| 30 |
+
Examples table:
|
| 31 |
+
| Prompt | Output |
|
| 32 |
+
| --- | --- |
|
| 33 |
+
| Satellite image of amsterdam with industrial area and highways | <img src="https://i.imgur.com/vrGpk45.png" width="300" /> |
|
| 34 |
+
| Watercolor style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/AQS34dk.png" width="300" /> |
|
| 35 |
+
| Toner style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/X8VcezT.png" width="300" /> |
|
| 36 |
+
| Satellite image with forests and residential, no water | <img src="https://i.imgur.com/MEccHdM.png" width="300" /> |
|
| 37 |
+
""",
|
| 38 |
+
fn=generate_image_predictions,
|
| 39 |
+
inputs=gr.components.Textbox(label="Enter a text prompt here"),
|
| 40 |
+
outputs=gr.components.Image(label="Output Image")
|
| 41 |
)
|
| 42 |
|
| 43 |
iface.launch()
|