-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
79 lines (64 loc) · 2.16 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="./rangeOCR.js"></script>
<script src="./node_modules/tesseract.js/dist/tesseract.min.js"></script>
<script src="./node_modules/pdfjs-dist/build/pdf.js"></script>
<script src="./node_modules/pdfjs-dist/build/pdf.worker.min.js"></script>
<link href="./dist/output.css" rel="stylesheet">
<title>rengeOCR</title>
<style type="text/css">
.result_block {
background: #ebeeff;
border-radius: 5px;
padding: 5px;
margin-bottom: 5px;
}
</style>
</head>
<body>
<!-- ヘッダー -->
<nav class="w-full">
<h2 class="flex justify-between text-gray-50 bg-green-400 mx-auto p-1 text-2xl">
RengeOCR
</h2>
</nav>
<div class="grid grid-cols-2 gap-2 p-5">
<div>
<!-- ファイル選択 -->
<input type="file" id="inputfile" accept="image/jpeg,image/png,image/gif,image/bmp,image/x-icon,.pdf" onchange="onAddFile(event);">
<!-- キャンバス -->
<img id="img_source" style="display:none;">
<canvas style="background-color: #e9e9e9;" id="SrcCanvas" onmousedown="OnMousedown(event);" onmousemove="OnMousemove(event);" onmouseup="OnMouseup(event);"></canvas>
</div>
<div>
<div id="result_area">
<div class="result_block">
<!-- ラジオボタン -->
<input type="radio" name="q1" value="0" checked>
<label> 0 </label>
<!-- 切り取り後キャンバス -->
<div id="RecCanvases">
<canvas id="RecCanvas_0"></canvas>
</div>
<select name="lang_0" id="selectLang_0">
<option value="jpn">jpn</option>
<option value="eng">eng</option>
</select>
<div>
<p id="progress_0"></p>
<p id="result_0"></p>
</div>
</div>
</div>
<div>
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" onclick="addRect();">+</button>
</div>
</div>
</div>
<!-- 文字起こしボタン -->
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded" onclick="transcription()">文字起こし</button>
</body>
</html>