Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +44 -56
templates/index.html
CHANGED
@@ -4,63 +4,51 @@
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>AI Question Answering</title>
|
7 |
-
<
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
}
|
35 |
-
|
|
|
|
|
|
|
36 |
</head>
|
37 |
<body>
|
38 |
-
<
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
</
|
50 |
-
<p id="docResult"></p>
|
51 |
-
|
52 |
-
<hr>
|
53 |
-
|
54 |
-
<h2>Ask a Question on an Image</h2>
|
55 |
-
<form id="imageForm" onsubmit="event.preventDefault(); askQuestion('imageForm', 'imageResult', '/question-answering-image');">
|
56 |
-
<label for="imageQuestion">Enter your question:</label>
|
57 |
-
<input type="text" id="imageQuestion" name="question" required>
|
58 |
-
<br><br>
|
59 |
-
<label for="imageFile">Upload an image:</label>
|
60 |
-
<input type="file" id="imageFile" name="image_file" accept="image/*" required>
|
61 |
-
<br><br>
|
62 |
-
<button type="submit">Ask</button>
|
63 |
-
</form>
|
64 |
-
<p id="imageResult"></p>
|
65 |
</body>
|
66 |
-
</html>
|
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>AI Question Answering</title>
|
7 |
+
<style>
|
8 |
+
body {
|
9 |
+
font-family: Arial, sans-serif;
|
10 |
+
display: flex;
|
11 |
+
justify-content: center;
|
12 |
+
align-items: center;
|
13 |
+
height: 100vh;
|
14 |
+
background-color: #f4f4f4;
|
15 |
+
}
|
16 |
+
.container {
|
17 |
+
background: white;
|
18 |
+
padding: 20px;
|
19 |
+
border-radius: 10px;
|
20 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
21 |
+
width: 400px;
|
22 |
+
}
|
23 |
+
input, button {
|
24 |
+
width: 100%;
|
25 |
+
margin-top: 10px;
|
26 |
+
padding: 10px;
|
27 |
+
border: 1px solid #ccc;
|
28 |
+
border-radius: 5px;
|
29 |
+
}
|
30 |
+
button {
|
31 |
+
background-color: #007BFF;
|
32 |
+
color: white;
|
33 |
+
cursor: pointer;
|
34 |
}
|
35 |
+
button:hover {
|
36 |
+
background-color: #0056b3;
|
37 |
+
}
|
38 |
+
</style>
|
39 |
</head>
|
40 |
<body>
|
41 |
+
<div class="container">
|
42 |
+
<h2>AI-Powered Q&A</h2>
|
43 |
+
<form action="/process" method="post" enctype="multipart/form-data">
|
44 |
+
<label for="file">Upload Document or Image:</label>
|
45 |
+
<input type="file" name="file" id="file" accept=".pdf,.docx,.pptx,.png,.jpg,.jpeg">
|
46 |
+
|
47 |
+
<label for="question">Enter Your Question:</label>
|
48 |
+
<input type="text" name="question" id="question" placeholder="Type your question here...">
|
49 |
+
|
50 |
+
<button type="submit">Ask AI</button>
|
51 |
+
</form>
|
52 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
</body>
|
54 |
+
</html>
|