DarkMrdan commited on
Commit
1f85ff0
·
1 Parent(s): c0bde2e

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +27 -16
index.html CHANGED
@@ -1,19 +1,30 @@
1
  <!DOCTYPE html>
2
  <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
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>