데이터/Python
[Challenge01.]OCR 처리한 결과 값을 화면에 Display하기
Sally_민지
2024. 1. 2. 19:59
최초 작성일: 2024-01-02
최종 작성일: 2024-01-02
목표: OCR 기능 완성하기
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Processing</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h1 class="mb-4">Image Processing</h1>
<form action="/process" method="post">
<button type="submit" class="btn btn-primary">Process All Images</button>
</form>
</div>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Processing Result</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
<div class="container mt-5">
<h1 class="mb-4">Image Processing Result</h1>
{% for result in results %}
<div class="card mb-4">
<div class="card-body">
<h5 class="card-title">Processed Image</h5>
<img src="{{ result.image_path }}" alt="Cropped Image" class="img-fluid mb-3">
<h5 class="card-title">Extracted Text:</h5>
<pre>{{ result.text }}</pre>
</div>
</div>
{% endfor %}
</div>
</body>
</html>