geninhu commited on
Commit
9ffffed
1 Parent(s): fe354eb
Files changed (9) hide show
  1. anime.png +0 -0
  2. app.py +33 -13
  3. aurora.png +0 -3
  4. fauvism.png +0 -3
  5. grumpy_cat.png +0 -3
  6. moon_gate.png +0 -3
  7. painting.png +0 -3
  8. shell.png +0 -3
  9. 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://huggingface.co/vumichien" target="_blank">Chien Vu</a> | <a href="https://huggingface.co/geninhu" target="_blank">Nhu Hoang</a>
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

  • SHA256: b48f5574f1e5dbd8a7ea95d31d55b3b8965ba968b900feaea30013f7258e0075
  • Pointer size: 132 Bytes
  • Size of remote file: 1.43 MB
fauvism.png DELETED

Git LFS Details

  • SHA256: dc1126a228d6a58153c798fa42f107d6a4381866b4e16354269492614b33966f
  • Pointer size: 132 Bytes
  • Size of remote file: 1.57 MB
grumpy_cat.png DELETED

Git LFS Details

  • SHA256: d91e48877b054a79cee2ccd8d6f4b3db9531afce3df8a7655bb38535740c8a6c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.08 MB
moon_gate.png DELETED

Git LFS Details

  • SHA256: 0bf214e6f577a3acc4e2be8e00178805fba5057bec9c4e8b4afd2eaf41238cd6
  • Pointer size: 132 Bytes
  • Size of remote file: 1.17 MB
painting.png DELETED

Git LFS Details

  • SHA256: fee0d866738cb2c70209cdb2e620045a564e31c84d3e7887310c0d81eaf38bc7
  • Pointer size: 132 Bytes
  • Size of remote file: 1.49 MB
shell.png DELETED

Git LFS Details

  • SHA256: d1840716d3a61e93cd8fb581caa14bc1a92507a42e89bcaa5a4ca441dd8253a5
  • Pointer size: 132 Bytes
  • Size of remote file: 2.24 MB
universe.png DELETED

Git LFS Details

  • SHA256: 9a40182f912968b8df5e5d2733566ef143bc7366895674d99f5ed47370e45e68
  • Pointer size: 132 Bytes
  • Size of remote file: 1.06 MB