Spaces:
Runtime error
Runtime error
Update templates/index.html
Browse files- templates/index.html +8 -2
templates/index.html
CHANGED
|
@@ -1,14 +1,20 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
-
<meta charset="UTF-8"
|
| 5 |
<title>OCR BY INK</title>
|
| 6 |
</head>
|
| 7 |
<body>
|
| 8 |
<h1>อัปโหลดภาพเพื่อแปลงเป็นข้อความ</h1>
|
|
|
|
| 9 |
<form action="/upload" method="post" enctype="multipart/form-data">
|
| 10 |
-
<input type="file" name="image" />
|
| 11 |
<button type="submit">แปลง</button>
|
| 12 |
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
</body>
|
| 14 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
<title>OCR BY INK</title>
|
| 6 |
</head>
|
| 7 |
<body>
|
| 8 |
<h1>อัปโหลดภาพเพื่อแปลงเป็นข้อความ</h1>
|
| 9 |
+
|
| 10 |
<form action="/upload" method="post" enctype="multipart/form-data">
|
| 11 |
+
<input type="file" name="image" accept="image/*" required />
|
| 12 |
<button type="submit">แปลง</button>
|
| 13 |
</form>
|
| 14 |
+
|
| 15 |
+
{% if result %}
|
| 16 |
+
<h2>ผลลัพธ์ OCR:</h2>
|
| 17 |
+
<pre>{{ result }}</pre>
|
| 18 |
+
{% endif %}
|
| 19 |
</body>
|
| 20 |
</html>
|