Spaces:
Sleeping
Sleeping
Commit ·
b5dba3d
1
Parent(s): 74c2727
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
-
# app.py
|
| 2 |
-
|
| 3 |
import streamlit as st
|
| 4 |
-
from main import generate_image_from_text,
|
| 5 |
|
| 6 |
def main():
|
| 7 |
st.title("Image Generation and Upscaling")
|
|
@@ -13,8 +11,8 @@ def main():
|
|
| 13 |
st.success("Generating image from text prompt...")
|
| 14 |
image_bytes = generate_image_from_text(prompt)
|
| 15 |
|
| 16 |
-
st.success("Upscaling image with
|
| 17 |
-
upscaled_image_bytes =
|
| 18 |
|
| 19 |
st.success("Further upscaling image with GFPGAN...")
|
| 20 |
img = further_upscale_image(upscaled_image_bytes)
|
|
@@ -22,4 +20,4 @@ def main():
|
|
| 22 |
st.image(img, caption='Upscaled Image', use_column_width=True)
|
| 23 |
|
| 24 |
if __name__ == "__main__":
|
| 25 |
-
main()
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from main import generate_image_from_text, upscale_image_esrgan, further_upscale_image
|
| 3 |
|
| 4 |
def main():
|
| 5 |
st.title("Image Generation and Upscaling")
|
|
|
|
| 11 |
st.success("Generating image from text prompt...")
|
| 12 |
image_bytes = generate_image_from_text(prompt)
|
| 13 |
|
| 14 |
+
st.success("Upscaling image with ESRGAN...")
|
| 15 |
+
upscaled_image_bytes = upscale_image_esrgan(image_bytes)
|
| 16 |
|
| 17 |
st.success("Further upscaling image with GFPGAN...")
|
| 18 |
img = further_upscale_image(upscaled_image_bytes)
|
|
|
|
| 20 |
st.image(img, caption='Upscaled Image', use_column_width=True)
|
| 21 |
|
| 22 |
if __name__ == "__main__":
|
| 23 |
+
main()
|