|
import streamlit as st |
|
from super_image import EdsrModel, ImageLoader |
|
from PIL import Image |
|
|
|
st.title('Take your picture to the next level') |
|
|
|
col1, col2 = st.columns([3, 1]) |
|
|
|
with col1: |
|
file = st.file_uploader('Post your picture') |
|
if file is not None: |
|
image = Image.open(image) |
|
st.image(image) |
|
|
|
with col2: |
|
choice = st.selectbox('Scale to', ['x2', 'x3', 'x4']) |
|
model_choice = st.selectbox('Model', ['EDSR', 'PAN', 'CARN']) |
|
|
|
st.text(choice) |
|
|
|
|
|
""" |
|
model = EdsrModel.from_pretrained('eugenesiow/edsr-base', scale=2) |
|
inputs = ImageLoader.load_image(image) |
|
preds = model(inputs) |
|
|
|
ImageLoader.save_image(preds, './scaled_2x.png') |
|
ImageLoader.save_compare(inputs, preds, './scaled_2x_compare.png')""" |