DataRaptor commited on
Commit
6159ab9
·
1 Parent(s): c0b5fd1

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -46
app.py CHANGED
@@ -114,46 +114,30 @@ examples = [
114
  "this petal has gorgeous purple petals and a long green pedicel",
115
  "this petal has gorgeous green petals and a long green pedicel",
116
  "a couple thin, sharp, knife-like petals that have a sharp, purple, needle-like center.",
 
117
  "salmon colored round petals with veins of dark pink throughout all combined in the center with a pale yellow pistol and pollen tube.",
118
- "this vivid pink flower is composed of several blossoms with ruffled petals above and below a bulbous yellow-streaked center.",
119
  "delicated pink petals clumped on one green pedicel with small sepals.",
120
  "the flower has big yellow upright petals attached to a thick vine",
121
  "these bright flowers have many yellow strip petals and stamen.",
122
- "a large red flower with black dots and a very long stigmas.",
123
- "this flower has petals that are pink and bell shaped",
124
  "this flower has petals that are yellow and has black lines",
125
  "the pink flower has bell shaped petal that is soft, smooth and enclosing stamen sticking out from the centre",
126
  "this flower has orange petals with many dark spots, white stamen, and dark anthers.",
127
  "this flower has petals that are white and has a yellow style",
128
  "his flower has petals that are orange and are very thin",
129
  "a flower with singular conical purple petal and large white pistil.",
130
- "this flower is yellow in color, and has petals that are very skinny.",
131
- "a velvet large flower with a dark marking and a green stem.",
132
- "this flower is yellow in color, and has petals that are very skinny.",
133
  "the flower has bright yellow soft petals with yellow stamens.",
134
- "this flower has petals that are pink and has red stamen",
135
  "this flower has petals that are purple and have dark lines",
136
  "this purple flower has pointy short petals and green sepal.",
137
  "this flower has petals that are purple and has a yellow style",
138
- "this flower is yellow in color, with petals that are skinny and pointed.",
139
  "the petals on this flower are orange with a purple pistil.",
140
- "this flower features a prominent ovary covered with dozens of small stamens featuring thin white petals.",
141
- "this purple color flower has the simple row of petals arranged in the circle with the red color pistils at the center",
142
- "this flower has petals that are red and are very thin",
143
- "a flower with many folded over bright yellow petals",
144
  "a flower with no visible petals and purple pistils in the center.",
145
  "a star shaped flower with five white petals with purple lines running through them.",
146
  "the petals on this flower are bright yellow in color and there are two rows. the bottom layer lays flat, while the top layer is shaped like a bowl around the pistil.",
147
  "this flower features a purple stigma surrounded by pointed waxy orange petals.",
148
- "this flower is yellow and brown in color, with petals that are oval shaped.",
149
- "this flower has petals that are white and has a yellow stigma",
150
- "a flower with folded open and back red petals with black spots and think red anther",
151
- "this flower has large light red petals and a few white stamen in the center",
152
- "this flower has bright orange tubular petals rising out of a thick receptacle on a green pedicel.",
153
- "this flower is a beauty with light red leaves in an equal circle.",
154
- "a flower with an open conical red petal and white anther supported by red filaments",
155
- "this flower is red in color, with petals that are bell shaped.",
156
- "the petals of this flower are yellow with a long stigma",
157
  ]
158
 
159
 
@@ -170,8 +154,7 @@ def app():
170
 
171
 
172
 
173
- se = st.selectbox("Select from example",
174
- examples)
175
 
176
  row1_col1, row1_col2 = st.columns([2, 3])
177
  width = 950
@@ -190,6 +173,14 @@ def app():
190
  if st.button("Generate", type="primary"):
191
  with st.spinner("Generating Flower Images..."):
192
 
 
 
 
 
 
 
 
 
193
  imgs = generate_image(caption, 12)
194
  #ss = st.success("Scores predicted successfully!")
195
 
@@ -208,29 +199,6 @@ def app():
208
 
209
 
210
 
211
-
212
- # with row1_col2:
213
- # img1 = Image.open('./images/t2i/1.jpg')
214
- # img2 = Image.open('./images/t2i/2.jpg')
215
- # img3 = Image.open('./images/t2i/3.jpg')
216
- # img4 = Image.open('./images/t2i/4.jpg')
217
- # cont = st.container()
218
- # with cont:
219
-
220
- # st.write("This is a container with a caption like a button.")
221
- # col1, col2, col3, col4 = st.columns(4)
222
- # with col1:
223
- # st.image(img1, width=128)
224
- # with col2:
225
- # st.image(img2, width=128)
226
- # with col3:
227
- # st.image(img3, width=128)
228
- # with col4:
229
- # st.image(img4, width=128)
230
-
231
-
232
-
233
-
234
  app()
235
 
236
  # # Display a footer with links and credits
 
114
  "this petal has gorgeous purple petals and a long green pedicel",
115
  "this petal has gorgeous green petals and a long green pedicel",
116
  "a couple thin, sharp, knife-like petals that have a sharp, purple, needle-like center.",
117
+ "this flower has petals that are pink and bell shaped",
118
  "salmon colored round petals with veins of dark pink throughout all combined in the center with a pale yellow pistol and pollen tube.",
119
+ "this flower features a prominent ovary covered with dozens of small stamens featuring thin white petals.",
120
  "delicated pink petals clumped on one green pedicel with small sepals.",
121
  "the flower has big yellow upright petals attached to a thick vine",
122
  "these bright flowers have many yellow strip petals and stamen.",
123
+ "a large red flower with black dots and a very long stigmas.",
124
+ "this vivid pink flower is composed of several blossoms with ruffled petals above and below a bulbous yellow-streaked center.",
125
  "this flower has petals that are yellow and has black lines",
126
  "the pink flower has bell shaped petal that is soft, smooth and enclosing stamen sticking out from the centre",
127
  "this flower has orange petals with many dark spots, white stamen, and dark anthers.",
128
  "this flower has petals that are white and has a yellow style",
129
  "his flower has petals that are orange and are very thin",
130
  "a flower with singular conical purple petal and large white pistil.",
 
 
 
131
  "the flower has bright yellow soft petals with yellow stamens.",
 
132
  "this flower has petals that are purple and have dark lines",
133
  "this purple flower has pointy short petals and green sepal.",
134
  "this flower has petals that are purple and has a yellow style",
 
135
  "the petals on this flower are orange with a purple pistil.",
136
+
 
 
 
137
  "a flower with no visible petals and purple pistils in the center.",
138
  "a star shaped flower with five white petals with purple lines running through them.",
139
  "the petals on this flower are bright yellow in color and there are two rows. the bottom layer lays flat, while the top layer is shaped like a bowl around the pistil.",
140
  "this flower features a purple stigma surrounded by pointed waxy orange petals.",
 
 
 
 
 
 
 
 
 
141
  ]
142
 
143
 
 
154
 
155
 
156
 
157
+ se = st.selectbox("Select from example", examples)
 
158
 
159
  row1_col1, row1_col2 = st.columns([2, 3])
160
  width = 950
 
173
  if st.button("Generate", type="primary"):
174
  with st.spinner("Generating Flower Images..."):
175
 
176
+
177
+ # # gen all
178
+ # for i in examples:
179
+ # imgs = generate_image(i, 1)
180
+ # st.markdown(i)
181
+
182
+ # st.image(imgs[0])
183
+
184
  imgs = generate_image(caption, 12)
185
  #ss = st.success("Scores predicted successfully!")
186
 
 
199
 
200
 
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  app()
203
 
204
  # # Display a footer with links and credits