Spaces:
Sleeping
Sleeping
Delete templates/index.html
Browse files- templates/index.html +0 -227
templates/index.html
DELETED
|
@@ -1,227 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Query Answering System</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap" rel="stylesheet">
|
| 8 |
-
<style>
|
| 9 |
-
body {
|
| 10 |
-
font-family: 'Poppins', sans-serif;
|
| 11 |
-
margin: 0;
|
| 12 |
-
padding: 0;
|
| 13 |
-
background-color: #121212;
|
| 14 |
-
color: #f5f5f5;
|
| 15 |
-
display: flex;
|
| 16 |
-
justify-content: center;
|
| 17 |
-
align-items: center;
|
| 18 |
-
height: 100vh;
|
| 19 |
-
overflow: hidden;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
.container {
|
| 23 |
-
display: flex;
|
| 24 |
-
justify-content: space-between;
|
| 25 |
-
width: 100%;
|
| 26 |
-
max-width: 1400px;
|
| 27 |
-
height: 100%;
|
| 28 |
-
}
|
| 29 |
-
|
| 30 |
-
.left-pane {
|
| 31 |
-
width: 45%;
|
| 32 |
-
background-color: #1f1f1f;
|
| 33 |
-
border-radius: 10px;
|
| 34 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
|
| 35 |
-
padding: 30px;
|
| 36 |
-
margin: 20px;
|
| 37 |
-
max-height: 90vh;
|
| 38 |
-
overflow-y: auto;
|
| 39 |
-
}
|
| 40 |
-
|
| 41 |
-
.right-pane {
|
| 42 |
-
width: 45%;
|
| 43 |
-
background-color: #1f1f1f;
|
| 44 |
-
border-radius: 10px;
|
| 45 |
-
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
|
| 46 |
-
padding: 30px;
|
| 47 |
-
margin: 20px;
|
| 48 |
-
max-height: 90vh;
|
| 49 |
-
overflow-y: auto;
|
| 50 |
-
position: sticky;
|
| 51 |
-
top: 0;
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
.header {
|
| 55 |
-
margin-bottom: 20px;
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
.header h1 {
|
| 59 |
-
font-size: 32px;
|
| 60 |
-
font-weight: 600;
|
| 61 |
-
margin-bottom: 10px;
|
| 62 |
-
color: #f5f5f5;
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
.header p {
|
| 66 |
-
font-size: 14px;
|
| 67 |
-
color: #bbb;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
.form-group {
|
| 71 |
-
margin-bottom: 20px;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
.form-group input[type="text"] {
|
| 75 |
-
width: 100%;
|
| 76 |
-
padding: 12px;
|
| 77 |
-
border: 2px solid #444;
|
| 78 |
-
background-color: #333;
|
| 79 |
-
color: #fff;
|
| 80 |
-
border-radius: 8px;
|
| 81 |
-
font-size: 16px;
|
| 82 |
-
transition: all 0.3s ease;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
.form-group input[type="text"]:focus {
|
| 86 |
-
border-color: #007bff;
|
| 87 |
-
outline: none;
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
.form-group button {
|
| 91 |
-
padding: 12px 25px;
|
| 92 |
-
background-color: #007bff;
|
| 93 |
-
color: #fff;
|
| 94 |
-
border: none;
|
| 95 |
-
border-radius: 8px;
|
| 96 |
-
cursor: pointer;
|
| 97 |
-
font-size: 16px;
|
| 98 |
-
transition: background-color 0.3s ease;
|
| 99 |
-
}
|
| 100 |
-
|
| 101 |
-
.form-group button:hover {
|
| 102 |
-
background-color: #0056b3;
|
| 103 |
-
}
|
| 104 |
-
|
| 105 |
-
.answer-section {
|
| 106 |
-
margin-top: 30px;
|
| 107 |
-
background-color: #333;
|
| 108 |
-
padding: 20px;
|
| 109 |
-
border-radius: 8px;
|
| 110 |
-
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
| 111 |
-
}
|
| 112 |
-
|
| 113 |
-
.answer-section h3 {
|
| 114 |
-
font-size: 22px;
|
| 115 |
-
font-weight: 600;
|
| 116 |
-
color: #f5f5f5;
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
-
.answer {
|
| 120 |
-
padding: 15px;
|
| 121 |
-
background-color: #444;
|
| 122 |
-
border-radius: 8px;
|
| 123 |
-
font-size: 16px;
|
| 124 |
-
white-space: pre-wrap;
|
| 125 |
-
color: #ddd;
|
| 126 |
-
}
|
| 127 |
-
|
| 128 |
-
.sources {
|
| 129 |
-
margin-top: 15px;
|
| 130 |
-
font-size: 14px;
|
| 131 |
-
color: #888;
|
| 132 |
-
}
|
| 133 |
-
|
| 134 |
-
.history-section {
|
| 135 |
-
margin-top: 30px;
|
| 136 |
-
background-color: #333;
|
| 137 |
-
padding: 20px;
|
| 138 |
-
border-radius: 8px;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
.history-item {
|
| 142 |
-
margin-bottom: 15px;
|
| 143 |
-
background-color: #444;
|
| 144 |
-
padding: 15px;
|
| 145 |
-
border-radius: 8px;
|
| 146 |
-
}
|
| 147 |
-
|
| 148 |
-
.history-item .question {
|
| 149 |
-
font-weight: bold;
|
| 150 |
-
color: #f5f5f5;
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
.history-item .answer {
|
| 154 |
-
color: #ddd;
|
| 155 |
-
}
|
| 156 |
-
|
| 157 |
-
/* Responsive adjustments */
|
| 158 |
-
@media screen and (max-width: 768px) {
|
| 159 |
-
.container {
|
| 160 |
-
flex-direction: column;
|
| 161 |
-
width: 90%;
|
| 162 |
-
max-width: 600px;
|
| 163 |
-
}
|
| 164 |
-
|
| 165 |
-
.left-pane, .right-pane {
|
| 166 |
-
width: 100%;
|
| 167 |
-
margin: 10px 0;
|
| 168 |
-
}
|
| 169 |
-
|
| 170 |
-
.header h1 {
|
| 171 |
-
font-size: 28px;
|
| 172 |
-
}
|
| 173 |
-
|
| 174 |
-
.form-group input[type="text"],
|
| 175 |
-
.form-group button {
|
| 176 |
-
font-size: 14px;
|
| 177 |
-
}
|
| 178 |
-
|
| 179 |
-
.answer-section h3 {
|
| 180 |
-
font-size: 20px;
|
| 181 |
-
}
|
| 182 |
-
}
|
| 183 |
-
</style>
|
| 184 |
-
</head>
|
| 185 |
-
<body>
|
| 186 |
-
|
| 187 |
-
<div class="container">
|
| 188 |
-
<div class="left-pane">
|
| 189 |
-
<div class="header">
|
| 190 |
-
<h1>Document AI</h1>
|
| 191 |
-
<p>Enter a query and get an answer based on the stored context.</p>
|
| 192 |
-
</div>
|
| 193 |
-
|
| 194 |
-
<form method="POST" action="{{ url_for('chat') }}">
|
| 195 |
-
<div class="form-group">
|
| 196 |
-
<input type="text" name="query_text" placeholder="Enter your query" value="{{ query_text }}" required>
|
| 197 |
-
</div>
|
| 198 |
-
<div class="form-group">
|
| 199 |
-
<button type="submit">Submit</button>
|
| 200 |
-
</div>
|
| 201 |
-
</form>
|
| 202 |
-
|
| 203 |
-
{% if answer %}
|
| 204 |
-
<div class="answer-section">
|
| 205 |
-
<h3>Answer:</h3>
|
| 206 |
-
<div class="answer">{{ answer }}</div>
|
| 207 |
-
</div>
|
| 208 |
-
{% endif %}
|
| 209 |
-
</div>
|
| 210 |
-
|
| 211 |
-
<div class="right-pane">
|
| 212 |
-
<div class="header">
|
| 213 |
-
<h1>Previous Queries</h1>
|
| 214 |
-
</div>
|
| 215 |
-
<div class="history-section">
|
| 216 |
-
{% for question, answer in history %}
|
| 217 |
-
<div class="history-item">
|
| 218 |
-
<div class="question">{{ question }}</div>
|
| 219 |
-
<div class="answer">{{ answer }}</div>
|
| 220 |
-
</div>
|
| 221 |
-
{% endfor %}
|
| 222 |
-
</div>
|
| 223 |
-
</div>
|
| 224 |
-
</div>
|
| 225 |
-
|
| 226 |
-
</body>
|
| 227 |
-
</html>
|
|
|
|
|
|
|
|
|
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