Spaces:
Running
Running
File size: 436 Bytes
1928e0b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
# Image Generator with Streamlit
```python
import streamlit as st
from PIL import Image
import requests
from io import BytesIO
st.title("Image Generator")
prompt = st.text_input("Enter your prompt:")
if st.button("Generate Image"):
response = requests.get(f"https://api.example.com/generate?prompt={prompt}")
img = Image.open(BytesIO(response.content))
st.image(img, caption="Generated Image", use_column_width=True)
|