map-diffuser / app.py
saburq's picture
add markdown
614dfc6
raw
history blame
1.73 kB
import gradio as gr
from inference_code import generate_images
def generate_image_predictions(prompt):
images = generate_images(prompt)
return images
iface = gr.Interface(
gr.Markdown(
"""
# Map Diffuser 🌍
Examples table:
| Prompt | Output |
| --- | --- |
| Satellite image of amsterdam with industrial area and highways | <img src="https://i.imgur.com/vrGpk45.png" width="300" /> |
| Watercolor style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/AQS34dk.png" width="300" /> |
| Toner style map of Amsterdam with residential area and highways | <img src="https://i.imgur.com/X8VcezT.png" width="300" /> |
| Satellite image with forests and residential, no water | <img src="https://i.imgur.com/MEccHdM.png" width="300" /> |
"""
),
fn=generate_image_predictions,
inputs=gr.components.Textbox(label="Enter a text prompt here"),
outputs=gr.components.Image(label="Output Image"),
title="🌍 Map Diffuser",
description="""
🌏 Generates images from a given text prompt. The prompts are in the format:
`{style} map of {city} with {features}` or
`satellite image of {city} with {features}` or
`satellite image with {features}` or
`satellite image of {city} with {features} and no {features}`
and so on...
So for example:
- "Satellite image of amsterdam with industrial area and highways"
- "Watercolor style map of Amsterdam with residential area and highways"
- "Toner style map of Amsterdam with residential area and highways"
- "Satellite image with forests and residential, no water"
"""
)
iface.launch()