-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
116 lines (103 loc) · 5.73 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Theia</title>
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]/dist/tf.min.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
<script src='https://unpkg.com/[email protected]/dist/tesseract.min.js'></script>
<script src="js/definitions.js"></script>
<script src="js/main.js"></script>
<link rel="stylesheet" href="css/main.css">
</head>
<body onload="main()">
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="#">Theia</a>
</nav>
<div class="container" style='width: 70%;'>
<div class="row" style="margin-top: 15px;">
<div style="margin: 0 auto;"><strong><em>Theia</em></strong> is a web resource that allows researchers to upload 70x70 images of ancient Greek characters for transcription. Begin by browsing for a file to upload and select the models that you wish to use for prediction for this image. Theia will produce a report of probabilities for predicted character labels after prediction has completed.</div>
</div>
<hr/>
<div class="row">
<div class="input-group mb-3" style="margin: 0 auto; width: 300px !important;">
<div class="custom-file">
<input type="file" class="custom-file-input" id="file-selector">
<label class="custom-file-label" for="file-selector">Choose file</label>
</div>
</div>
</div>
Select models:
<div id="model_options" class="d-flex flex-row" style="margin: 0 auto;">
<!--
<div class="row w-50 mx-auto">
<div class="col">
<div><strong>Model 1</strong></div>
<div class="dropdown">
<select class="browser-default custom-select">
<option selected>Select a Model</option>
<option value="1">ResNet</option>
</select>
</div>
</div>
<div class="col">
<div><strong>Model 2</div>
<div class="dropdown">
<select class="browser-default custom-select">
<option selected>Select a Model</option>
<option value="1">ResNet</option>
</select>
</div>
</div>
</div>
-->
</div>
<div class="row" style="margin-top: 15px">
<div style="margin: 0 auto;">
<button id="predict" type="button" class="btn btn-primary">Generate Predictions</button>
</div>
</div>
<hr/>
<!-- Image Container -->
<div id="results-container" class="row" style="display: none;">
<div class="col">
<div class="w-50 mx-auto">
<div style="text-align: center;">
<strong>Analyzed Image:</strong> <br/>
<canvas width="70" height="70" id="display" style="border: 1px solid black;"></canvas>
</div>
</div>
</div>
<div class="col">
<table class="table" style="width: 200px;">
<thead id="table-results-1-head">
<tr>
<th scope="col">Letter</th>
<th scope="col">M1</th>
<th scope="col">M2</th>
</tr>
</thead>
<tbody id="table-results-1">
</tbody>
</table>
</div>
</div>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script>
/* show file value after file select */
document.querySelector('.custom-file-input').addEventListener('change',function(e){
var fileName = document.getElementById("file-selector").files[0].name;
var nextSibling = e.target.nextElementSibling
nextSibling.innerText = fileName
});
</script>
</body>
</html>