chenjian commited on
Commit
8fb5db4
1 Parent(s): 3dbd785

add multi-language samples

Browse files
Files changed (1) hide show
  1. app.py +74 -14
app.py CHANGED
@@ -109,54 +109,114 @@ block = gr.Blocks(css=css)
109
  examples = [
110
  [
111
  '戴着眼镜的猫',
112
- '中文(Chineses)',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
113
  '油画(Oil painting)'
114
  ],
115
  [
116
  '日落时的城市天际线,史前遗迹风格',
117
- '中文(Chineses)',
118
  '油画(Oil painting)'
119
  ],
120
  [
121
  '一只猫坐在椅子上,戴着一副墨镜, low poly 风格',
122
- '中文(Chineses)',
123
  '卡通(Cartoon)'
124
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  [
126
  '一只猫坐在椅子上,戴着一副墨镜,秋天风格',
127
- '中文(Chineses)',
128
  '探索无限(Explore infinity)'
129
  ],
130
  [
131
  '蒙娜丽莎,赛博朋克,宝丽来,33毫米,蒸汽波艺术',
132
- '中文(Chineses)',
133
  '探索无限(Explore infinity)'
134
  ],
135
  [
136
  '一只猫坐在椅子上,戴着一副墨镜,海盗风格',
137
- '中文(Chineses)',
138
  '探索无限(Explore infinity)'
139
  ],
140
  [
141
  '一条由闪电制成的令人敬畏的龙,概念艺术',
142
- '中文(Chineses)',
143
  '探索无限(Explore infinity)'
144
  ],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  [
146
  '梵高猫头鹰,蒸汽波艺术',
147
- '中文(Chineses)',
148
  '探索无限(Explore infinity)'
149
  ],
150
  [
151
  '萨尔瓦多·达利描绘古代文明的超现实主义梦幻油画,写实风格',
152
- '中文(Chineses)',
153
  '探索无限(Explore infinity)'
154
  ],
155
  [
156
  '夕阳日落时,阳光落在云层上,海面波涛汹涌,风景,胶片感',
157
- '中文(Chineses)',
158
  '探索无限(Explore infinity)'
159
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  ]
161
 
162
  with block:
@@ -202,7 +262,7 @@ with block:
202
  label="Prompt",
203
  show_label=False,
204
  max_lines=1,
205
- placeholder="Enter your prompt",
206
  ).style(
207
  border=(True, False, True, True),
208
  rounded=(True, False, False, True),
@@ -213,7 +273,7 @@ with block:
213
  margin=False,
214
  rounded=(False, True, True, False),
215
  )
216
- language = gr.Dropdown(label="语言(language)", choices=['中文(Chineses)','英文(English)', '日文(Japanese)', '韩文(Korean)'], value='中文(Chineses)', type="index")
217
  styles = gr.Dropdown(label="风格(style)", choices=['水彩(Watercolor)','油画(Oil painting)', '粉笔画(Chalk drawing)', '卡通(Cartoon)', '蜡笔画(Crayon drawing)', '儿童画(Children\'s drawing)', '探索无限(Explore infinity)'], value='探索无限(Explore infinity)', type="index")
218
  gallery = gr.Gallery(
219
  label="Generated images", show_label=False, elem_id="gallery"
@@ -669,4 +729,4 @@ In "Explore infinity" style mode, how the image looks like is totally up to your
669
  </div>
670
  ''')
671
 
672
- block.queue(concurrency_count=48).launch()
 
109
  examples = [
110
  [
111
  '戴着眼镜的猫',
112
+ '中文(Chinese)',
113
+ '油画(Oil painting)'
114
+ ],
115
+ [
116
+ 'A cat with glasses',
117
+ '英文(English)',
118
+ '油画(Oil painting)'
119
+ ],
120
+ [
121
+ '眼鏡をかけた猫',
122
+ '日文(Japanese)',
123
+ '油画(Oil painting)'
124
+ ],
125
+ [
126
+ '안경을 쓴 고양이',
127
+ '韩文(Korean)',
128
  '油画(Oil painting)'
129
  ],
130
  [
131
  '日落时的城市天际线,史前遗迹风格',
132
+ '中文(Chinese)',
133
  '油画(Oil painting)'
134
  ],
135
  [
136
  '一只猫坐在椅子上,戴着一副墨镜, low poly 风格',
137
+ '中文(Chinese)',
138
  '卡通(Cartoon)'
139
  ],
140
+ [
141
+ 'A cat sitting on a chair, wearing a pair of sunglasses, low poly style',
142
+ '英文(English)',
143
+ '油画(Oil painting)'
144
+ ],
145
+ [
146
+ '猫が椅子に座ってサングラスをかけている、low polyスタイル',
147
+ '日文(Japanese)',
148
+ '油画(Oil painting)'
149
+ ],
150
+ [
151
+ '고양이 한 마리가 의자에 앉아 선글라스를 끼고 low poly 스타일을 하고 있다',
152
+ '韩文(Korean)',
153
+ '油画(Oil painting)'
154
+ ],
155
  [
156
  '一只猫坐在椅子上,戴着一副墨镜,秋天风格',
157
+ '中文(Chinese)',
158
  '探索无限(Explore infinity)'
159
  ],
160
  [
161
  '蒙娜丽莎,赛博朋克,宝丽来,33毫米,蒸汽波艺术',
162
+ '中文(Chinese)',
163
  '探索无限(Explore infinity)'
164
  ],
165
  [
166
  '一只猫坐在椅子上,戴着一副墨镜,海盗风格',
167
+ '中文(Chinese)',
168
  '探索无限(Explore infinity)'
169
  ],
170
  [
171
  '一条由闪电制成的令人敬畏的龙,概念艺术',
172
+ '中文(Chinese)',
173
  '探索无限(Explore infinity)'
174
  ],
175
+ [
176
+ 'An awesome dragon made of lightning, conceptual art',
177
+ '英文(English)',
178
+ '油画(Oil painting)'
179
+ ],
180
+ [
181
+ '稲妻で作られた畏敬の念を抱かせる竜、コンセプトアート',
182
+ '日文(Japanese)',
183
+ '油画(Oil painting)'
184
+ ],
185
+ [
186
+ '번개로 만든 경외스러운 용, 개념 예술',
187
+ '韩文(Korean)',
188
+ '油画(Oil painting)'
189
+ ],
190
  [
191
  '梵高猫头鹰,蒸汽波艺术',
192
+ '中文(Chinese)',
193
  '探索无限(Explore infinity)'
194
  ],
195
  [
196
  '萨尔瓦多·达利描绘古代文明的超现实主义梦幻油画,写实风格',
197
+ '中文(Chinese)',
198
  '探索无限(Explore infinity)'
199
  ],
200
  [
201
  '夕阳日落时,阳光落在云层上,海面波涛汹涌,风景,胶片感',
202
+ '中文(Chinese)',
203
  '探索无限(Explore infinity)'
204
+ ],
205
+ [
206
+ 'Sunset, the sun falls on the clouds, the sea is rough, the scenery is filmy',
207
+ '英文(English)',
208
+ '油画(Oil painting)'
209
+ ],
210
+ [
211
+ '夕日が沈むと、雲の上に太陽の光が落ち、海面は波が荒く、風景、フィルム感',
212
+ '日文(Japanese)',
213
+ '油画(Oil painting)'
214
+ ],
215
+ [
216
+ '석양이 질 때 햇빛이 구름 위에 떨어지고, 해수면의 파도가 용솟음치며, 풍경, 필름감',
217
+ '韩文(Korean)',
218
+ '油画(Oil painting)'
219
+ ],
220
  ]
221
 
222
  with block:
 
262
  label="Prompt",
263
  show_label=False,
264
  max_lines=1,
265
+ placeholder="Enter your prompt, multiple languages are supported now.",
266
  ).style(
267
  border=(True, False, True, True),
268
  rounded=(True, False, False, True),
 
273
  margin=False,
274
  rounded=(False, True, True, False),
275
  )
276
+ language = gr.Dropdown(label="Prompt语言(Prompt language)", choices=['中文(Chinese)','英文(English)', '日文(Japanese)', '韩文(Korean)'], value='中文(Chinese)', type="index")
277
  styles = gr.Dropdown(label="风格(style)", choices=['水彩(Watercolor)','油画(Oil painting)', '粉笔画(Chalk drawing)', '卡通(Cartoon)', '蜡笔画(Crayon drawing)', '儿童画(Children\'s drawing)', '探索无限(Explore infinity)'], value='探索无限(Explore infinity)', type="index")
278
  gallery = gr.Gallery(
279
  label="Generated images", show_label=False, elem_id="gallery"
 
729
  </div>
730
  ''')
731
 
732
+ block.queue(concurrency_count=80).launch()