qtAnswering / templates /index.html
ikraamkb's picture
Update templates/index.html
4fd0ec2 verified
raw
history blame
2.17 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Question Answering | Ask Questions on Documents and Images</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link href="/static/styles.css" rel="stylesheet"> <!-- Linking CSS file -->
</head>
<body>
<div class="container">
<h1 class="text-center my-5">AI Question Answering</h1>
<form action="/question-answering-doc" method="POST" enctype="multipart/form-data">
<div class="mb-3">
<label for="file" class="form-label">Choose Document (PDF, DOCX, PPTX)</label>
<input type="file" class="form-control" name="file" required>
</div>
<div class="mb-3">
<label for="question" class="form-label">Enter Your Question</label>
<input type="text" class="form-control" name="question" required>
</div>
<button type="submit" class="btn btn-primary">Submit Question</button>
</form>
<form action="/question-answering-image" method="POST" enctype="multipart/form-data" class="mt-5">
<div class="mb-3">
<label for="image" class="form-label">Choose Image (JPG, PNG)</label>
<input type="file" class="form-control" name="image_file" required>
</div>
<div class="mb-3">
<label for="image-question" class="form-label">Enter Your Question</label>
<input type="text" class="form-control" name="question" required>
</div>
<button type="submit" class="btn btn-primary">Submit Question</button>
</form>
<div class="mt-4">
{% if answer %}
<h3>Answer:</h3>
<p>{{ answer }}</p>
{% endif %}
{% if image_text %}
<h3>Image Text (OCR Result):</h3>
<p>{{ image_text }}</p>
{% endif %}
</div>
</div>
</body>
</html>