qtAnswering / templates /index.html
ikraamkb's picture
Update templates/index.html
37e38dd verified
raw
history blame
1.56 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI-powered QA</title>
<link rel="stylesheet" type="text/css" href="/static/app.css">
</head>
<body>
<h1>Ask a Question!</h1>
<!-- Document QA Form -->
<h2>Question about Document:</h2>
<form action="/question-answering-doc" method="post" enctype="multipart/form-data">
<label for="question">Question:</label>
<input type="text" id="question" name="question" required><br><br>
<label for="file">Upload a Document (PDF, DOCX, PPTX):</label>
<input type="file" id="file" name="file" accept=".pdf,.docx,.pptx" required><br><br>
<button type="submit">Submit</button>
</form>
<!-- Image QA Form -->
<h2>Question about Image:</h2>
<form action="/question-answering-image" method="post" enctype="multipart/form-data">
<label for="image_question">Question:</label>
<input type="text" id="image_question" name="question" required><br><br>
<label for="image_file">Upload an Image:</label>
<input type="file" id="image_file" name="image_file" accept="image/*" required><br><br>
<button type="submit">Submit</button>
</form>
<!-- Display Answer -->
{% if answer %}
<h2>Answer: {{ answer }}</h2>
{% endif %}
{% if image_text %}
<h3>Extracted Text from Image:</h3>
<p>{{ image_text }}</p>
{% endif %}
</body>
</html>