-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
95 lines (84 loc) · 3.69 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/>
<title>Face Swap App</title>
<!-- CSS -->
<link href="./static/css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection"/>
</head>
<body>
<nav style="background-color: #E85A03" class="lighten-1" role="navigation" style="height: 100px">
<div class="nav-wrapper container">
<a id="logo-container" class="brand-logo center"><h5>Face Swap App</h5></a>
<div style="margin-left: 800px">
Made by <a class="black-text text-lighten-1">Santosh</a>
</div>
</div>
</nav>
<div class="section no-pad-bot" id="index-banner">
<div class="container">
<div class="row">
<form action='/' method="post" class="col s12" enctype="multipart/form-data">
<div class="row">
<div class="input-field col s4">
<div>
<img src="{{ url_for('static',filename=source) }}" width="300" height="300">
</div>
<div class="row">
<label for="first_name"><b>Upload Source Image</b></label><br>
<div class = "file-field input-field">
<div class = "btn" style="background-color: #E85A03">
<span>Browse</span>
<input type = "file" name="source_image" id="source_image" />
</div>
<div class = "file-path-wrapper">
<input class = "file-path validate" type = "text" placeholder = "Upload Image" name="source_name" id="source_name" />
</div>
</div>
</div>
</div>
<div class="input-field col s4" style="margin-left: 20px">
<div>
<img src="{{ url_for('static',filename=destination) }}" width="300" height="300">
</div>
<div class="row">
<label for="first_name"><b>Upload Destination Image</b></label><br>
<div class = "file-field input-field">
<div class = "btn" style="background-color: #E85A03">
<span>Browse</span>
<input type = "file" name="destination_image" id="destination_image" />
</div>
<div class = "file-path-wrapper">
<input class = "file-path validate" type = "text" placeholder = "Upload Image" name="destination_name" id="destination_name" />
</div>
</div>
</div>
</div>
<div class="input-field col s3" style="margin-left: 20px;">
<div>
<img src="{{ url_for('static',filename=result) }}" width="300" height="300">
</div>
<div class="row center" style="margin-top:30px; margin-left:80px">
<button id="submit" type="submit" class="btn-large" style="background-color: #E85A03">Swap</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Scripts-->
<script src="./static/js/materialize.js"></script>
<script type="text/javascript">
document.getElementById('source_image').onchange = function () {
document.getElementById('source_name').value = this.value.slice(12,100);
};
document.getElementById('destination_image').onchange = function () {
document.getElementById('destination_name').value = this.value.slice(12,100);
};
</script>
</body>
</html>