()
| 7 | server_url=f"http://backend:8088/pgan" |
| 8 | |
| 9 | def pgan(): |
| 10 | st.title("PGAN - Progressive Growing of GANS") |
| 11 | st.write( |
| 12 | """Serving PGAN model using FastAPI and Streamlit.""" |
| 13 | ) |
| 14 | |
| 15 | if st.button("Generate"): |
| 16 | res = requests.get(server_url) |
| 17 | pgan_image = Image.open(io.BytesIO(res.content)) |
| 18 | col1, col2 = st.beta_columns(2) |
| 19 | col1.header("PGAN Image") |
| 20 | col1.image(pgan_image, use_column_width=True) |