Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +7 -1
templates/index.html
CHANGED
@@ -4,20 +4,25 @@
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>AI-powered QA</title>
|
|
|
7 |
</head>
|
8 |
<body>
|
9 |
<h1>Ask a Question!</h1>
|
10 |
|
|
|
|
|
11 |
<form action="/question-answering-doc" method="post" enctype="multipart/form-data">
|
12 |
<label for="question">Question:</label>
|
13 |
<input type="text" id="question" name="question" required><br><br>
|
14 |
|
15 |
-
<label for="file">Upload a Document:</label>
|
16 |
<input type="file" id="file" name="file" accept=".pdf,.docx,.pptx" required><br><br>
|
17 |
|
18 |
<button type="submit">Submit</button>
|
19 |
</form>
|
20 |
|
|
|
|
|
21 |
<form action="/question-answering-image" method="post" enctype="multipart/form-data">
|
22 |
<label for="image_question">Question:</label>
|
23 |
<input type="text" id="image_question" name="question" required><br><br>
|
@@ -28,6 +33,7 @@
|
|
28 |
<button type="submit">Submit</button>
|
29 |
</form>
|
30 |
|
|
|
31 |
{% if answer %}
|
32 |
<h2>Answer: {{ answer }}</h2>
|
33 |
{% endif %}
|
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>AI-powered QA</title>
|
7 |
+
<link rel="stylesheet" type="text/css" href="/static/app.css">
|
8 |
</head>
|
9 |
<body>
|
10 |
<h1>Ask a Question!</h1>
|
11 |
|
12 |
+
<!-- Document QA Form -->
|
13 |
+
<h2>Question about Document:</h2>
|
14 |
<form action="/question-answering-doc" method="post" enctype="multipart/form-data">
|
15 |
<label for="question">Question:</label>
|
16 |
<input type="text" id="question" name="question" required><br><br>
|
17 |
|
18 |
+
<label for="file">Upload a Document (PDF, DOCX, PPTX):</label>
|
19 |
<input type="file" id="file" name="file" accept=".pdf,.docx,.pptx" required><br><br>
|
20 |
|
21 |
<button type="submit">Submit</button>
|
22 |
</form>
|
23 |
|
24 |
+
<!-- Image QA Form -->
|
25 |
+
<h2>Question about Image:</h2>
|
26 |
<form action="/question-answering-image" method="post" enctype="multipart/form-data">
|
27 |
<label for="image_question">Question:</label>
|
28 |
<input type="text" id="image_question" name="question" required><br><br>
|
|
|
33 |
<button type="submit">Submit</button>
|
34 |
</form>
|
35 |
|
36 |
+
<!-- Display Answer -->
|
37 |
{% if answer %}
|
38 |
<h2>Answer: {{ answer }}</h2>
|
39 |
{% endif %}
|