Spaces:
Runtime error
Runtime error
chenjian
commited on
Commit
·
a1434f1
1
Parent(s):
67e702f
add content
Browse files
app.py
CHANGED
@@ -1,20 +1,15 @@
|
|
1 |
import numpy as np
|
2 |
import gradio as gr
|
3 |
import paddlehub as hub
|
4 |
-
import time
|
5 |
|
6 |
|
7 |
-
model = hub.Module(
|
8 |
-
|
9 |
-
def inference(text_prompts,
|
10 |
-
enter_module_time = time.time()
|
11 |
-
print('enter module time ', time.ctime(enter_module_time))
|
12 |
try:
|
|
|
13 |
results = model.generate_image(
|
14 |
text_prompts=text_prompts, style=style, visualization=False)
|
15 |
-
exist_module_time = time.time()
|
16 |
-
print('Exist module time ',time.ctime(exist_module_time))
|
17 |
-
print('module exectution time ', exist_module_time-enter_module_time)
|
18 |
return 'Success', results[:6]
|
19 |
except Exception as e:
|
20 |
error_text = str(e)
|
@@ -104,15 +99,15 @@ block = gr.Blocks(css=css)
|
|
104 |
examples = [
|
105 |
[
|
106 |
'戴着眼镜的猫',
|
107 |
-
'油画'
|
108 |
],
|
109 |
[
|
110 |
'日落时的城市天际线,史前遗迹风格',
|
111 |
-
'油画'
|
112 |
],
|
113 |
[
|
114 |
'一只猫坐在椅子上,戴着一副墨镜, low poly 风格',
|
115 |
-
'卡通'
|
116 |
],
|
117 |
]
|
118 |
|
@@ -169,7 +164,7 @@ with block:
|
|
169 |
margin=False,
|
170 |
rounded=(False, True, True, False),
|
171 |
)
|
172 |
-
styles = gr.Dropdown(label="style(风格)", choices=['水彩','油画', '粉笔画', '卡通', '蜡笔画', '儿童画', '探索无限'], value='
|
173 |
gallery = gr.Gallery(
|
174 |
label="Generated images", show_label=False, elem_id="gallery"
|
175 |
).style(grid=[2, 3], height="auto")
|
@@ -191,15 +186,437 @@ with block:
|
|
191 |
<div class="prompt">
|
192 |
<p><h4>Prompt公式</h4>
|
193 |
<span> Prompt = [形容词] [主语] ,[细节设定], [修饰语或者艺术家]。 </span>
|
194 |
-
关于各部分的构造方式和效果,可以参考<a href="https://github.com/PaddlePaddle/PaddleHub/
|
|
|
|
|
195 |
</p>
|
196 |
</div>
|
197 |
-
|
198 |
-
<p>
|
199 |
-
</
|
200 |
-
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
"""
|
203 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
block.queue(concurrency_count=100).launch()
|
|
|
1 |
import numpy as np
|
2 |
import gradio as gr
|
3 |
import paddlehub as hub
|
|
|
4 |
|
5 |
|
6 |
+
model = hub.Module(name='ernie_vilg')
|
7 |
+
style_list = ['水彩','油画', '粉笔画', '卡通', '蜡笔画', '儿童画', '探索无限']
|
8 |
+
def inference(text_prompts, style_indx):
|
|
|
|
|
9 |
try:
|
10 |
+
style = style_list[style_indx]
|
11 |
results = model.generate_image(
|
12 |
text_prompts=text_prompts, style=style, visualization=False)
|
|
|
|
|
|
|
13 |
return 'Success', results[:6]
|
14 |
except Exception as e:
|
15 |
error_text = str(e)
|
|
|
99 |
examples = [
|
100 |
[
|
101 |
'戴着眼镜的猫',
|
102 |
+
'油画(Oil painting)'
|
103 |
],
|
104 |
[
|
105 |
'日落时的城市天际线,史前遗迹风格',
|
106 |
+
'油画(Oil painting)'
|
107 |
],
|
108 |
[
|
109 |
'一只猫坐在椅子上,戴着一副墨镜, low poly 风格',
|
110 |
+
'卡通(Cartoon)'
|
111 |
],
|
112 |
]
|
113 |
|
|
|
164 |
margin=False,
|
165 |
rounded=(False, True, True, False),
|
166 |
)
|
167 |
+
styles = gr.Dropdown(label="style(风格)", choices=['水彩(Watercolor)','油画(Oil painting)', '粉笔画(Chalk drawing)', '卡通(Cartoon)', '蜡笔画(Crayon drawing)', '儿童画(Children\'s drawing)', '探索无限(Explore infinity)'], value='探索无限(Explore infinity)', type="index")
|
168 |
gallery = gr.Gallery(
|
169 |
label="Generated images", show_label=False, elem_id="gallery"
|
170 |
).style(grid=[2, 3], height="auto")
|
|
|
186 |
<div class="prompt">
|
187 |
<p><h4>Prompt公式</h4>
|
188 |
<span> Prompt = [形容词] [主语] ,[细节设定], [修饰语或者艺术家]。 </span>
|
189 |
+
关于各部分的构造方式和效果,可以参考<a href="https://github.com/PaddlePaddle/PaddleHub/blob/develop/modules/image/text_to_image/ernie_vilg/README.md#四-prompt-指南" style="text-decoration: underline;" target="_blank">YouPromptMe指南</a>。
|
190 |
+
更多的模型,请关注<a href="https://github.com/PaddlePaddle/PaddleHub" style="text-decoration: underline;" target="_blank"> PaddleHub 官方Repo </a>, 并star收藏。
|
191 |
+
同时,可以在 <a href="https://aistudio.baidu.com/aistudio/projectdetail/4462918, style="text-decoration: underline;" target="_blank"> aistudio </a> 上使用免费的GPU体验更多案例。
|
192 |
</p>
|
193 |
</div>
|
194 |
+
<div class="prompt">
|
195 |
+
<p><h4>Prompt format</h4>
|
196 |
+
<span> Prompt = [adjective] [object], [details], [styles or artists]. </span>
|
197 |
+
For more details, please refer to <a href="https://github.com/PaddlePaddle/PaddleHub/blob/develop/modules/image/text_to_image/ernie_vilg/README.md#四-prompt-指南" style="text-decoration: underline;" target="_blank">YouPromptMe Guide</a>.
|
198 |
+
There are more interesting models in PaddleHub, you can star <a href="https://github.com/PaddlePaddle/PaddleHub" style="text-decoration: underline;" target="_blank"> PaddleHub</a> to follow.
|
199 |
+
Besides, you can use free GPU resourses in <a href="https://aistudio.baidu.com/aistudio/projectdetail/4462918, style="text-decoration: underline;" target="_blank"> aistudio </a> to enjoy more cases, have fun.
|
200 |
+
</p>
|
201 |
+
</div>
|
202 |
+
<img src="https://user-images.githubusercontent.com/22424850/187849103-074cb6d2-a9b4-49a1-b1f0-fc130049769f.png" alt="star Paddlehub" width="100%">
|
203 |
|
204 |
"""
|
205 |
)
|
206 |
+
gr.Markdown(
|
207 |
+
"""
|
208 |
+
在"探索无限"的风格模式下,画作的真实风格完全可以由你的prompt来决定。下面是一些参考案例:
|
209 |
+
|
210 |
+
|
211 |
+
In "Explore infinity" style mode, how the image looks like is totally up to your prompt. Below are some cases:
|
212 |
+
|
213 |
+
### 复古未来主义风格
|
214 |
+
|
215 |
+
|  |  |
|
216 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
217 |
+
| 一只猫坐在椅子上,戴着一副墨镜,复古未来主义风格 | 日落时的城市天际线,复古未来主义风格 |
|
218 |
+
|
219 |
+
|
220 |
+
|
221 |
+
### 粉彩朋克风格
|
222 |
+
|
223 |
+
|  |  |
|
224 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
225 |
+
| 一只猫坐在椅子上,戴着一副墨镜,粉彩朋克风格 | 日落时的城市天际线,粉彩朋克风格 |
|
226 |
+
|
227 |
+
### 史前遗迹风格
|
228 |
+
|
229 |
+
|  |  |
|
230 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
231 |
+
| 一只猫坐在椅子上,戴着一副墨镜,史前遗迹风格 | 日落时的城市天际线,史前遗迹风格 |
|
232 |
+
|
233 |
+
|
234 |
+
|
235 |
+
|
236 |
+
### 波普艺术风格
|
237 |
+
|
238 |
+
|  |  |
|
239 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
240 |
+
| 一只猫坐在椅子上,戴着一副墨镜,波普艺术风格 | 日落时的城市天际线,后世界末日风格 |
|
241 |
+
|
242 |
+
|
243 |
+
|
244 |
+
### 迷幻风格
|
245 |
+
|
246 |
+
|  |  |
|
247 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
248 |
+
| 一只猫坐在椅子上,戴着一副墨镜,迷幻风格 | 日落时的城市天际线,迷幻风格 |
|
249 |
+
|
250 |
+
|
251 |
+
### 赛博朋克风格
|
252 |
+
|
253 |
+
|  |  |
|
254 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
255 |
+
| 一只猫坐在椅子上,戴着一副墨镜,赛博朋克风格 | 日落时的城市天际线,赛博朋克风格 |
|
256 |
+
|
257 |
+
|
258 |
+
### 纸箱风格
|
259 |
+
|
260 |
+
|
261 |
+
|  |  |
|
262 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
263 |
+
| 一只猫坐在椅子上,戴着一副墨镜,纸箱风格 | 日落时的城市天际线,纸箱风格 |
|
264 |
+
|
265 |
+
### 未来主义风格
|
266 |
+
|
267 |
+
|  |  |
|
268 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
269 |
+
| 一只猫坐在椅子上,戴着一副墨镜,未来主义风格 | 一只猫坐在椅子上,戴着一副墨镜,未来主义风格 |
|
270 |
+
|
271 |
+
|
272 |
+
|
273 |
+
### 抽象技术风格
|
274 |
+
|
275 |
+
|  |  |
|
276 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
277 |
+
| 一只猫坐在椅子上,戴着一副墨镜,抽象技术风格 | 日落时的城市天际线,抽象技术风格 |
|
278 |
+
|
279 |
+
|
280 |
+
|
281 |
+
|
282 |
+
### 海滩兔风格
|
283 |
+
|
284 |
+
|
285 |
+
|  |  |
|
286 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
287 |
+
| 一只猫坐在椅子上,戴着一副墨镜,海滩兔风格 | 日落时的城市天际线,海滩兔风格 |
|
288 |
+
|
289 |
+
|
290 |
+
### 粉红公主风格
|
291 |
+
|
292 |
+
|  |  |
|
293 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
294 |
+
| 一只猫坐在椅子上,戴着一副墨镜,粉红公主风格 | 日落时的城市天际线,粉红公主风格 |
|
295 |
+
|
296 |
+
|
297 |
+
### 嬉皮士风格
|
298 |
+
|
299 |
+
|  |  |
|
300 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
301 |
+
| 一只猫坐在椅子上,戴着一副墨镜,嬉皮士风格 | 日落时的城市天际线,嬉皮士风格 |
|
302 |
+
|
303 |
+
### 幻象之城风格
|
304 |
+
|
305 |
+
|  |  |
|
306 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
307 |
+
| 一只猫坐在椅子上,戴着一副墨镜,幻象之城风格 | 日落时的城市天际线,幻象之城风格 |
|
308 |
+
|
309 |
+
|
310 |
+
### 美人鱼风格
|
311 |
+
|
312 |
+
|  |  |
|
313 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
314 |
+
| 一只猫坐在椅子上,戴着一副墨镜,美人鱼风格 | 日落时的城市天际线,美人鱼风格 |
|
315 |
+
|
316 |
+
|
317 |
+
### 迷宫物语风格
|
318 |
+
|
319 |
+
|
320 |
+
|  |  |
|
321 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
322 |
+
| 一只猫坐在椅子上,戴着一副墨镜,迷宫物语风格 | 日落时的城市天际线,迷宫物语风格 |
|
323 |
+
|
324 |
+
### 仙女风格
|
325 |
+
|
326 |
+
|
327 |
+
|  |  |
|
328 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
329 |
+
| 一只猫坐在椅子上,戴着一副墨镜,仙女风格 | 日落时的城市天际线,仙女风格 |
|
330 |
+
|
331 |
+
|
332 |
+
|
333 |
+
|
334 |
+
|
335 |
+
### Low Poly 风格
|
336 |
+
|
337 |
+
|  |  |
|
338 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
339 |
+
| 一只猫坐在椅子上,戴着一副墨镜, low poly 风格 | 日落时的城市天际线, low-poly |
|
340 |
+
|
341 |
+
|
342 |
+
|
343 |
+
|
344 |
+
### 浮世绘风格
|
345 |
+
|
346 |
+
|  |  |
|
347 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
348 |
+
| 一只猫坐在椅子上,戴着一副墨镜,浮世绘风格 | 日落时的城市天际线,浮世绘风格 |
|
349 |
+
|
350 |
+
### 矢量心风格
|
351 |
+
|
352 |
+
|  |  |
|
353 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
354 |
+
| 一只猫坐在椅子上,戴着一副墨镜,矢量心风格 | 日落时的城市天际线,矢量心风格 |
|
355 |
+
|
356 |
+
|
357 |
+
### 摩托车手风格
|
358 |
+
|
359 |
+
|
360 |
+
|  |  |
|
361 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
362 |
+
| 一只猫坐在椅子上,戴着一副墨镜,摩托车手风格 | 日落时的城市天际线,摩托车手风格 |
|
363 |
+
|
364 |
+
|
365 |
+
|
366 |
+
### 孟菲斯公司风格
|
367 |
+
|
368 |
+
|
369 |
+
|  |  |
|
370 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
371 |
+
| 一只猫坐在椅子上,戴着一副墨镜,孟菲斯公司风格 | 日落时的城市天际线,孟菲斯公司风格 |
|
372 |
+
|
373 |
+
|
374 |
+
### 泥塑风格
|
375 |
+
|
376 |
+
|
377 |
+
|  |  |
|
378 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
379 |
+
| 一只猫坐在椅子上,戴着一副墨镜, 泥塑风格 | 日落时的城市天际线, 泥塑风格 |
|
380 |
+
|
381 |
+
|
382 |
+
|
383 |
+
|
384 |
+
### 苔藓风格
|
385 |
+
|
386 |
+
|  |  |
|
387 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
388 |
+
| 一只猫坐在椅子上,戴着一副墨镜,苔藓风格 | 日落时的城市天际线,苔藓风格 |
|
389 |
+
|
390 |
+
|
391 |
+
|
392 |
+
### 新浪潮风格
|
393 |
+
|
394 |
+
|  |  |
|
395 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
396 |
+
| 一只猫坐在椅子上,戴着一副墨镜,新浪潮风格 | 日落时的城市天际线,新浪潮风格 |
|
397 |
+
|
398 |
+
### 嘻哈风格
|
399 |
+
|
400 |
+
|  |  |
|
401 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
402 |
+
| 一只猫坐在椅子上,戴着一副墨镜,嘻哈风格 | 日落时的城市天际线,嘻哈风格 |
|
403 |
+
|
404 |
+
### 矢量图
|
405 |
+
|
406 |
+
|  |  |
|
407 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
408 |
+
| 一只猫坐在椅子上,戴着一副墨镜, 矢量图 | 日落时的城市天际线, 矢量图 |
|
409 |
+
|
410 |
+
### 铅笔艺术
|
411 |
+
|
412 |
+
|
413 |
+
|  |  |
|
414 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
415 |
+
| 一只猫坐在椅子上,戴着一副墨镜, 铅笔艺术 | 日落时的城市天际线, 铅笔艺术 |
|
416 |
+
|
417 |
+
|
418 |
+
### 女巫店风格
|
419 |
+
|
420 |
+
|  |  |
|
421 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
422 |
+
| 一只猫坐在椅子上,戴着一副墨镜,女巫店风格 | 日落时的城市天际线,女巫店风格 |
|
423 |
+
|
424 |
+
|
425 |
+
|
426 |
+
### 4D 建模
|
427 |
+
|
428 |
+
|
429 |
+
|  |  |
|
430 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
431 |
+
| 一只猫坐在椅子上,戴着一副墨镜, 4D 建模 | 日落时的城市天际线, 4D 建模 |
|
432 |
+
|
433 |
+
|
434 |
+
|
435 |
+
### 水彩墨风格
|
436 |
+
|
437 |
+
|
438 |
+
|  |  |
|
439 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
440 |
+
| 一只猫坐在椅子上,戴着一副墨镜, 水彩墨风格 | 日落时的城市天际线, 水彩墨风格 |
|
441 |
+
|
442 |
+
|
443 |
+
|
444 |
+
### 酸性精灵风格
|
445 |
+
|
446 |
+
|  |  |
|
447 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
448 |
+
| 一只猫坐在椅子上,戴着一副墨镜,酸性精灵风格 | 日落时的城市天际线,酸性精灵风格 |
|
449 |
+
|
450 |
+
|
451 |
+
### 海盗风格
|
452 |
+
|
453 |
+
|  |  |
|
454 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
455 |
+
| 日落时的城市天际线,海盗风格 | 一只猫坐在椅子上,戴着一副墨镜,海盗风格 |
|
456 |
+
|
457 |
+
|
458 |
+
|
459 |
+
### 古埃及风格
|
460 |
+
|
461 |
+
|
462 |
+
|  |  |
|
463 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
464 |
+
| 一只猫坐在椅子上,戴着一副墨镜,古埃及风格 | 日落时的城市天际线,古埃及风格 |
|
465 |
+
|
466 |
+
### 风帽风格
|
467 |
+
|
468 |
+
|
469 |
+
|  |  |
|
470 |
+
| --------------------------------------------------------- | ------------------------------------------------------------ |
|
471 |
+
| 一只猫坐在椅子上,戴着一副墨镜,风帽风格 | 日落时的城市天际线,风帽风格 |
|
472 |
+
|
473 |
+
### 装饰艺术风格
|
474 |
+
|
475 |
+
|
476 |
+
|  |  |
|
477 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
478 |
+
| 一只猫坐在椅子上,戴着一副墨镜,装饰艺术风格 | 日落时的城市天际线,装饰艺术风格 |
|
479 |
+
|
480 |
+
### 极光风格
|
481 |
+
|
482 |
+
|
483 |
+
|  |  |
|
484 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
485 |
+
| 一只猫坐在椅子上,戴着一副墨镜,极光风格 | 日落时的城市天际线,极光风格 |
|
486 |
+
|
487 |
+
### 秋天风格
|
488 |
+
|
489 |
+
|
490 |
+
|  |  |
|
491 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
492 |
+
| 日落时的城市天际线,秋天风格 | 一只猫坐在椅子上,戴着一副墨镜,秋天风格 |
|
493 |
+
|
494 |
+
### 巴洛克风格
|
495 |
+
|
496 |
+
|
497 |
+
|  |  |
|
498 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
499 |
+
| 一只猫坐在椅子上,戴着一副墨镜,巴洛克风格 | 日落时的城市天际线,巴洛克风格 |
|
500 |
+
|
501 |
+
### 立体主义风格
|
502 |
+
|
503 |
+
|  |  |
|
504 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
505 |
+
| 一只猫坐在椅子上,戴着一副墨镜,立体主义风格 | 日落时的城市天际线,立体主义风格 |
|
506 |
+
|
507 |
+
|
508 |
+
### 黑暗自然主义风格
|
509 |
+
|
510 |
+
|  |  |
|
511 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
512 |
+
| 一只猫坐在椅子上,戴着一副墨镜,黑暗自然主义风格 | 日落时的城市天际线,黑暗自然主义风格 |
|
513 |
+
|
514 |
+
### 表现主义风格
|
515 |
+
|
516 |
+
|  |  |
|
517 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
518 |
+
| 一只猫坐在椅子上,戴着一副墨镜,表现主义风格 | 日落时的城市天际线,表现主义风格 |
|
519 |
+
|
520 |
+
### 野兽派风格
|
521 |
+
|
522 |
+
|  |  |
|
523 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
524 |
+
| 一只猫坐在椅子上,戴着一副墨镜,野兽派风格 | 日落时的城市天际线,野兽派风格 |
|
525 |
+
|
526 |
+
### 鬼魂风格
|
527 |
+
|
528 |
+
|  |  |
|
529 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
530 |
+
| 一只猫坐在椅子上,戴着一副墨镜,鬼魂风格 | 日落时的城市天际线,鬼魂风格 |
|
531 |
+
|
532 |
+
### 印象主义风格
|
533 |
+
|
534 |
+
|  |  |
|
535 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
536 |
+
| 一只猫坐在椅子上,戴着一副墨镜,印象主义风格 | 日落时的城市天际线,印象主义风格 |
|
537 |
+
|
538 |
+
### 卡瓦伊风格
|
539 |
+
|
540 |
+
|  |  |
|
541 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
542 |
+
| 一只猫坐在椅子上,戴着一副墨镜,卡瓦伊风格 | 日落时的城市天际线,卡瓦伊风格 |
|
543 |
+
|
544 |
+
### 极简主义风格
|
545 |
+
|
546 |
+
|  |  |
|
547 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
548 |
+
| 一只猫坐在椅子上,戴着一副墨镜,极简主义风格 | 日落时的城市天际线,极简主义风格 |
|
549 |
+
|
550 |
+
### 水井惠郎风格
|
551 |
+
|
552 |
+
|  |  |
|
553 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
554 |
+
| 一只猫坐在椅子上,戴着一副墨镜,水井惠郎风格 | 日落时的城市天际线,水井惠郎风格 |
|
555 |
+
|
556 |
+
### 照片写实风格
|
557 |
+
|
558 |
+
|  |  |
|
559 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
560 |
+
| 一只猫坐在椅子上,戴着一副墨镜,照片写实风格 | 日落时的城市天际线,照片写实风格 |
|
561 |
+
|
562 |
+
|
563 |
+
### 像素可爱风格
|
564 |
+
|
565 |
+
|  |  |
|
566 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
567 |
+
| 一只猫坐在椅子上,戴着一副墨镜,像素可爱风格 | 日落时的城市天际线,像素可爱风格 |
|
568 |
+
|
569 |
+
|
570 |
+
|
571 |
+
### 雨天风格
|
572 |
+
|
573 |
+
|  |  |
|
574 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
575 |
+
| 日落时的城市天际线,雨天风格 | 一只猫坐在椅子上,戴着一副墨镜,雨天风格 |
|
576 |
+
|
577 |
+
### 湿漉漉的风格
|
578 |
+
|
579 |
+
|  |  |
|
580 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
581 |
+
| 一只猫坐在椅子上,戴着一副墨镜,湿漉漉的风格 | 日落时的城市天际线,湿漉漉的风格 |
|
582 |
+
|
583 |
+
|
584 |
+
### 维京人风格
|
585 |
+
|
586 |
+
|  |  |
|
587 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
588 |
+
| 一只猫坐在椅子上,戴着一副墨镜,维京人风格 | 日落时的城市天际线,维京人风格 |
|
589 |
+
|
590 |
+
### 后印象主义
|
591 |
+
|
592 |
+
|
593 |
+
|  |  |
|
594 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
595 |
+
| 一只猫坐在椅子上,戴着一副墨镜,风格:后印象主义 | 日落时的城市天际线, 风格:后印象主义-v2 |
|
596 |
+
|
597 |
+
### 素人主义
|
598 |
+
|
599 |
+
|
600 |
+
|  |  |
|
601 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
602 |
+
| 一只猫坐在椅子上,戴着一副墨镜,风格:素人主义 | 日落时的城市天际线, 风格:素人艺术 |
|
603 |
+
|
604 |
+
|
605 |
+
|
606 |
+
### 碎核风格
|
607 |
+
|
608 |
+
|
609 |
+
|  |  |
|
610 |
+
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
611 |
+
| 一只猫坐在椅子上,戴着一副墨镜,碎核风格 | 日落时的城市天际线,碎核风格 |
|
612 |
+
|
613 |
+
"""
|
614 |
+
)
|
615 |
+
gr.HTML('''
|
616 |
+
<div class="footer">
|
617 |
+
<p>Model by <a href="https://github.com/PaddlePaddle/PaddleHub" style="text-decoration: underline;" target="_blank">PaddleHub</a> and <a href="https://wenxin.baidu.com" style="text-decoration: underline;" target="_blank">文心大模型</a> - Gradio Demo by 🤗 Hugging Face
|
618 |
+
</p>
|
619 |
+
</div>
|
620 |
+
''')
|
621 |
|
622 |
block.queue(concurrency_count=100).launch()
|