Spaces:
Configuration error
Configuration error
Update index.html
Browse files- index.html +27 -16
index.html
CHANGED
@@ -1,19 +1,30 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
</html>
|
|
|
1 |
<!DOCTYPE html>
|
2 |
<html>
|
3 |
+
<head>
|
4 |
+
<title>首页</title>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<meta name="viewport" content="width=device-width">
|
7 |
+
<link rel="stylesheet" href="style.css">
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<h1>图像风格迁移——卡通化名画</h1>
|
11 |
+
<!--上传文件必须加enctype="multipart/form-data-->
|
12 |
+
<form action="/" method="post" enctype="multipart/form-data">
|
13 |
+
风格图1: <input type="file" name="image1" accept="image/*">
|
14 |
+
风格图2: <input type="file" name="image2" accept="image/*">
|
15 |
+
<input type="submit" name="submit" value="上传">
|
16 |
+
</form>
|
17 |
+
<!-- <img src="static/2.jpg"> -->
|
18 |
+
<h1>处理前的图片:</h1>
|
19 |
+
<img src="{{ url_for('static', filename=filename1 ) }}" alt="处理前的图片1">
|
20 |
+
<img src="{{ url_for('static', filename=filename2 ) }}" alt="处理前的图片2">
|
21 |
+
<h1>处理后的图片:</h1>
|
22 |
+
<!-- <img src="{{ url_for('static', filename='uploads/image_path' ) }}" alt="处理后的图片">
|
23 |
+
-->
|
24 |
+
<img src="{{ url_for('static', filename=image_path ) }}" alt="处理后的图片">
|
25 |
+
<br>
|
26 |
+
{% if image_path %}
|
27 |
+
<a href="{{ url_for('static', filename=image_path) }} " download>点击下载生成的图片</a>
|
28 |
+
{% endif %}
|
29 |
+
</body>
|
30 |
</html>
|