Spaces:
Runtime error
Runtime error
Add video
Browse files- anime.png +0 -0
- app.py +33 -13
- aurora.png +0 -3
- fauvism.png +0 -3
- grumpy_cat.png +0 -3
- moon_gate.png +0 -3
- painting.png +0 -3
- shell.png +0 -3
- universe.png +0 -3
anime.png
DELETED
Binary file (984 kB)
|
|
app.py
CHANGED
@@ -60,31 +60,51 @@ def load_lottieurl(url: str):
|
|
60 |
|
61 |
def show_model_summary(expanded):
|
62 |
st.subheader("Model gallery")
|
63 |
-
with st.expander('', expanded=expanded):
|
64 |
col1, col2, col3, col4 = st.columns(4)
|
65 |
with col1:
|
66 |
st.markdown('Fauvism GAN [model](https://huggingface.co/huggan/fastgan-few-shot-fauvism-still-life)', unsafe_allow_html=True)
|
67 |
-
st.image('fauvism.png', width=200)
|
68 |
st.markdown('Painting GAN [model](https://huggingface.co/huggan/fastgan-few-shot-painting)', unsafe_allow_html=True)
|
69 |
-
st.image('painting.png', width=200)
|
70 |
|
71 |
with col2:
|
72 |
st.markdown('Aurora GAN [model](https://huggingface.co/huggan/fastgan-few-shot-aurora)', unsafe_allow_html=True)
|
73 |
-
st.image('aurora.png', width=200)
|
74 |
st.markdown('Universe GAN [model](https://huggingface.co/huggan/fastgan-few-shot-universe)', unsafe_allow_html=True)
|
75 |
-
st.image('universe.png', width=200)
|
76 |
|
77 |
with col3:
|
78 |
st.markdown('Anime GAN [model](https://huggingface.co/huggan/fastgan-few-shot-anime-face)', unsafe_allow_html=True)
|
79 |
-
st.image('anime.png', width=200)
|
80 |
st.markdown('Shell GAN [model](https://huggingface.co/huggan/fastgan-few-shot-shells)', unsafe_allow_html=True)
|
81 |
-
st.image('shell.png', width=200)
|
82 |
|
83 |
with col4:
|
84 |
st.markdown('Grumpy cat GAN [model](https://huggingface.co/huggan/fastgan-few-shot-grumpy-cat)', unsafe_allow_html=True)
|
85 |
-
st.image('grumpy_cat.png', width=200)
|
86 |
st.markdown('Moon gate GAN [model](https://huggingface.co/huggan/fastgan-few-shot-moongate)', unsafe_allow_html=True)
|
87 |
-
st.image('moon_gate.png', width=200)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
|
89 |
|
90 |
def main():
|
@@ -119,7 +139,7 @@ def main():
|
|
119 |
<p style='text-align: center; font-size: 14px;'>
|
120 |
Model training and Spaces creating by
|
121 |
<br/>
|
122 |
-
<a href="https://
|
123 |
<br/>
|
124 |
</p>
|
125 |
""",
|
@@ -135,7 +155,7 @@ def main():
|
|
135 |
with col11:
|
136 |
img_type = st.selectbox("Choose type of image to generate", index=0,
|
137 |
options=["aurora", "anime", "painting", "fauvism", "shell", "universe", "grumpy cat", "moon gate"])
|
138 |
-
|
139 |
number_imgs = st.slider('How many images you want to generate ?', min_value=1, max_value=5)
|
140 |
if number_imgs is None:
|
141 |
st.write('Invalid number ! Please insert number of images to generate !')
|
@@ -162,7 +182,7 @@ def main():
|
|
162 |
st.image(gan_images[1], width=300)
|
163 |
else:
|
164 |
st.image(gan_images[1:], width=150)
|
165 |
-
|
166 |
elif choose == 'Mix style':
|
167 |
st.header("Mix style")
|
168 |
st.markdown(
|
@@ -190,7 +210,7 @@ def main():
|
|
190 |
mix_imgs = Image.fromarray(mix_imgs)
|
191 |
with col22:
|
192 |
st.image(mix_imgs, width=600)
|
193 |
-
|
194 |
|
195 |
if __name__ == '__main__':
|
196 |
main()
|
|
|
60 |
|
61 |
def show_model_summary(expanded):
|
62 |
st.subheader("Model gallery")
|
63 |
+
with st.expander('Image gallery', expanded=expanded):
|
64 |
col1, col2, col3, col4 = st.columns(4)
|
65 |
with col1:
|
66 |
st.markdown('Fauvism GAN [model](https://huggingface.co/huggan/fastgan-few-shot-fauvism-still-life)', unsafe_allow_html=True)
|
67 |
+
st.image('assets/image/fauvism.png', width=200)
|
68 |
st.markdown('Painting GAN [model](https://huggingface.co/huggan/fastgan-few-shot-painting)', unsafe_allow_html=True)
|
69 |
+
st.image('assets/image/painting.png', width=200)
|
70 |
|
71 |
with col2:
|
72 |
st.markdown('Aurora GAN [model](https://huggingface.co/huggan/fastgan-few-shot-aurora)', unsafe_allow_html=True)
|
73 |
+
st.image('assets/image/aurora.png', width=200)
|
74 |
st.markdown('Universe GAN [model](https://huggingface.co/huggan/fastgan-few-shot-universe)', unsafe_allow_html=True)
|
75 |
+
st.image('assets/image/universe.png', width=200)
|
76 |
|
77 |
with col3:
|
78 |
st.markdown('Anime GAN [model](https://huggingface.co/huggan/fastgan-few-shot-anime-face)', unsafe_allow_html=True)
|
79 |
+
st.image('assets/image/anime.png', width=200)
|
80 |
st.markdown('Shell GAN [model](https://huggingface.co/huggan/fastgan-few-shot-shells)', unsafe_allow_html=True)
|
81 |
+
st.image('assets/image/shell.png', width=200)
|
82 |
|
83 |
with col4:
|
84 |
st.markdown('Grumpy cat GAN [model](https://huggingface.co/huggan/fastgan-few-shot-grumpy-cat)', unsafe_allow_html=True)
|
85 |
+
st.image('assets/image/grumpy_cat.png', width=200)
|
86 |
st.markdown('Moon gate GAN [model](https://huggingface.co/huggan/fastgan-few-shot-moongate)', unsafe_allow_html=True)
|
87 |
+
st.image('assets/image/moon_gate.png', width=200)
|
88 |
+
|
89 |
+
with st.expander('Video gallery', expanded=False):
|
90 |
+
cols=st.columns(4)
|
91 |
+
cols[0].write("Universe GAN")
|
92 |
+
cols[0].image('assets/video/universe.gif')
|
93 |
+
cols[0].write("Fauvism still life GAN")
|
94 |
+
cols[0].image('assets/video/fauvism.gif')
|
95 |
+
|
96 |
+
cols[1].write("Aurora GAN")
|
97 |
+
cols[1].image('assets/video/aurora.gif')
|
98 |
+
cols[1].write("Moon gate GAN")
|
99 |
+
cols[1].image('assets/video/moon_gate.gif')
|
100 |
+
|
101 |
+
cols[2].write("Anime GAN")
|
102 |
+
cols[2].image('assets/video/anime.gif')
|
103 |
+
cols[2].write("Painting GAN")
|
104 |
+
cols[2].image('assets/video/painting.gif')
|
105 |
+
|
106 |
+
cols[3].write("Grumpy cat GAN")
|
107 |
+
cols[3].image('assets/video/grumpy_cat.gif')
|
108 |
|
109 |
|
110 |
def main():
|
|
|
139 |
<p style='text-align: center; font-size: 14px;'>
|
140 |
Model training and Spaces creating by
|
141 |
<br/>
|
142 |
+
<a href="https://www.linkedin.com/in/vumichien/" target="_blank">Chien Vu</a> | <a href="https://www.linkedin.com/in/nhu-hoang/" target="_blank">Nhu Hoang</a>
|
143 |
<br/>
|
144 |
</p>
|
145 |
""",
|
|
|
155 |
with col11:
|
156 |
img_type = st.selectbox("Choose type of image to generate", index=0,
|
157 |
options=["aurora", "anime", "painting", "fauvism", "shell", "universe", "grumpy cat", "moon gate"])
|
158 |
+
|
159 |
number_imgs = st.slider('How many images you want to generate ?', min_value=1, max_value=5)
|
160 |
if number_imgs is None:
|
161 |
st.write('Invalid number ! Please insert number of images to generate !')
|
|
|
182 |
st.image(gan_images[1], width=300)
|
183 |
else:
|
184 |
st.image(gan_images[1:], width=150)
|
185 |
+
|
186 |
elif choose == 'Mix style':
|
187 |
st.header("Mix style")
|
188 |
st.markdown(
|
|
|
210 |
mix_imgs = Image.fromarray(mix_imgs)
|
211 |
with col22:
|
212 |
st.image(mix_imgs, width=600)
|
213 |
+
|
214 |
|
215 |
if __name__ == '__main__':
|
216 |
main()
|
aurora.png
DELETED
Git LFS Details
|
fauvism.png
DELETED
Git LFS Details
|
grumpy_cat.png
DELETED
Git LFS Details
|
moon_gate.png
DELETED
Git LFS Details
|
painting.png
DELETED
Git LFS Details
|
shell.png
DELETED
Git LFS Details
|
universe.png
DELETED
Git LFS Details
|