HQTextGANV0 / app.py
SusiePHaltmann's picture
Update app.py
2c71197
raw
history blame
2.1 kB
import sys
sys.path.append("pixray/text2image")
from os import path
from PIL import Image
from PIL import ImageFont
from PIL import Image
from PIL import ImageFont
from PIL import Image
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageDraw
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageFont
from PIL import ImageDraw
from PIL import ImageFont
import os
import replicate
import st
## make a catch 404 statement if there is a bug
import streamlit.components.v1 as components
## now make a streamalit app gui for pixray text2image
import streamlit as st
import numpy as np
import PIL
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
import PIL.ImageOps
def main():
import replicate
model = replicate.models.get("pixray/text2image")
model.predict(prompts=input("Enter text: "))
## make a streamlit app
## fix import replicate
## make a streamlit app gui for pixray text2image
import streamlit as st
import numpy as np
import PIL
import PIL.Image
import PIL.ImageDraw
import streamlit.components.v1 as components
## now make a streamalit app gui for pixray text2image
import streamlit as st
import numpy as np
import PIL
import PIL.Image
import PIL.ImageDraw
import PIL.ImageFont
import PIL.ImageOps
def main():
st.title("Pixray Text2Image")
st.markdown("""
This app converts text to images.
""")
st.markdown("""
**How to use:**
1. Enter text in the text box below.
2. Click the button to convert text to an image.
3. Click the button to save the image.
""")
text = st.text_area("Enter text here:", "")
if st.button("Convert text to image"):
image = model.predict(prompts=text)
st.image(image, use_column_width=True)
if st.button("Save image"):
st.write("Saving image...")
image.save("image.png")
st.success("Image saved.")
## v0.1x INFDEV [HALTMANN AGI]