Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,7 @@ from torchvision.utils import make_grid
|
|
10 |
from PIL import Image
|
11 |
|
12 |
from streamlit_lottie import st_lottie
|
|
|
13 |
import requests
|
14 |
|
15 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
@@ -98,6 +99,12 @@ def main():
|
|
98 |
|
99 |
with st.sidebar:
|
100 |
st_lottie(lottie_penguin, height=200)
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
st.sidebar.markdown(
|
102 |
"""
|
103 |
___
|
@@ -121,11 +128,16 @@ def main():
|
|
121 |
)
|
122 |
|
123 |
st.header("Welcome to FastGAN")
|
124 |
-
checked = st.checkbox('Click here if you want to create one of your own !')
|
125 |
|
126 |
-
if
|
127 |
show_model_summary(True)
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
col11, col12, col13 = st.columns([3,3.5,3.5])
|
130 |
with col11:
|
131 |
img_type = st.selectbox("Choose type of image to generate", index=0,
|
|
|
10 |
from PIL import Image
|
11 |
|
12 |
from streamlit_lottie import st_lottie
|
13 |
+
from streamlit_option_menu import option_menu
|
14 |
import requests
|
15 |
|
16 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
|
99 |
|
100 |
with st.sidebar:
|
101 |
st_lottie(lottie_penguin, height=200)
|
102 |
+
choose = option_menu("FastGAN",
|
103 |
+
["Model Gallery", "Create your own images"],
|
104 |
+
#icons=['house', 'camera fill'],
|
105 |
+
menu_icon="app-indicator", default_index=0,
|
106 |
+
styles={"container": {"border-radius": ".0rem"}}
|
107 |
+
)
|
108 |
st.sidebar.markdown(
|
109 |
"""
|
110 |
___
|
|
|
128 |
)
|
129 |
|
130 |
st.header("Welcome to FastGAN")
|
|
|
131 |
|
132 |
+
if choose == 'Model Gallery':
|
133 |
show_model_summary(True)
|
134 |
+
elif choose == 'Create your own images':
|
135 |
+
#checked = st.checkbox('Click here if you want to create one of your own !')
|
136 |
+
|
137 |
+
# if not checked:
|
138 |
+
# show_model_summary(True)
|
139 |
+
# if checked:
|
140 |
+
# show_model_summary(False)
|
141 |
col11, col12, col13 = st.columns([3,3.5,3.5])
|
142 |
with col11:
|
143 |
img_type = st.selectbox("Choose type of image to generate", index=0,
|