Singularity666's picture
Update app.py
a47b1ea
raw
history blame
835 Bytes
import streamlit as st
from main import generate_image_from_text, upscale_image_esrgan, further_upscale_image
def main():
st.title("Image Generation and Upscaling")
st.write("Enter a text prompt and an image will be generated and upscaled.")
prompt = st.text_input("Enter a textual prompt to generate an image...")
if prompt:
st.success("Generating image from text prompt...")
image_bytes = generate_image_from_text(prompt)
st.success("Upscaling image with ESRGAN...")
upscaled_image_bytes = upscale_image_esrgan(image_bytes)
st.success("Further upscaling image with GFPGAN...")
download_link = further_upscale_image(upscaled_image_bytes)
st.markdown(download_link, unsafe_allow_html=True)
if __name__ == "__main__":
main()