OAGen_Linear / app_streamlit.py
firatozdemir's picture
move to gradio
a326e04
raw
history blame
362 Bytes
import os, glob, sys
import pickle
import streamlit as st
import utils
in_gpu = False
num_images = 1
G = utils.load_default_gen(in_gpu=in_gpu)
sampler = utils.SampleFromGAN(G=G, z_shp=[num_images, G.z_dim], in_gpu=in_gpu)
button_on_click = utils.Plot(im_gen=sampler)
button_gen_clicked = st.button(label='Generate an image', key='n', on_click=button_on_click)