jvedsaqib commited on
Commit
dd314a5
·
verified ·
1 Parent(s): ba6748c

Update templates/query.html

Browse files
Files changed (1) hide show
  1. templates/query.html +4 -64
templates/query.html CHANGED
@@ -3,7 +3,7 @@
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Chat Interface</title>
7
  <style>
8
  body {
9
  font-family: Arial, sans-serif;
@@ -12,14 +12,12 @@
12
  padding: 0;
13
  color: #333;
14
  }
15
-
16
  h1 {
17
  text-align: center;
18
  margin-top: 20px;
19
  font-size: 2em;
20
  color: #4a4a4a;
21
  }
22
-
23
  .container-box {
24
  display: flex;
25
  align-items: flex-start;
@@ -30,7 +28,6 @@
30
  border-radius: 8px;
31
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
32
  }
33
-
34
  .img-container {
35
  flex: 1;
36
  margin-right: 20px;
@@ -44,21 +41,18 @@
44
  align-items: center;
45
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
46
  }
47
-
48
  .img-container img {
49
  max-width: 100%;
50
  max-height: 100%;
51
  object-fit: cover;
52
  border-radius: 8px;
53
  }
54
-
55
  .chat-container {
56
  flex: 2;
57
  display: flex;
58
  flex-direction: column;
59
  max-width: 600px;
60
  }
61
-
62
  .chat-message {
63
  margin: 10px 0;
64
  padding: 10px;
@@ -66,33 +60,12 @@
66
  max-width: 100%;
67
  word-wrap: break-word;
68
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
69
- }
70
-
71
- .user-message {
72
- background-color: #d1f7c4;
73
- align-self: flex-end;
74
- }
75
-
76
- .bot-message {
77
  background-color: #e3e3e3;
78
  align-self: flex-start;
79
  }
80
-
81
  .textarea-container {
82
  margin-top: 20px;
83
  }
84
-
85
- .textarea-container textarea {
86
- width: 100%;
87
- height: 100px;
88
- padding: 10px;
89
- border: 1px solid #ddd;
90
- border-radius: 5px;
91
- font-size: 16px;
92
- resize: none;
93
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
94
- }
95
-
96
  .textarea-container input[type="file"] {
97
  display: block;
98
  margin: 10px 0;
@@ -102,24 +75,6 @@
102
  background-color: #f9f9f9;
103
  cursor: pointer;
104
  }
105
-
106
- .textarea-container label.thumbnail-button {
107
- display: inline-block;
108
- margin: 10px 0;
109
- padding: 8px 16px;
110
- background-color: #007bff;
111
- color: #fff;
112
- border-radius: 5px;
113
- cursor: pointer;
114
- text-align: center;
115
- font-size: 16px;
116
- font-weight: bold;
117
- }
118
-
119
- .textarea-container label.thumbnail-button:hover {
120
- background-color: #0056b3;
121
- }
122
-
123
  .textarea-container button.send-button {
124
  display: inline-block;
125
  padding: 10px 20px;
@@ -130,11 +85,9 @@
130
  font-size: 16px;
131
  cursor: pointer;
132
  }
133
-
134
  .textarea-container button.send-button:hover {
135
  background-color: #218838;
136
  }
137
-
138
  .form-wrapper {
139
  display: flex;
140
  flex-direction: column;
@@ -162,32 +115,19 @@
162
  </div>
163
  <div class="chat-container" id="chat-container">
164
  <div class="chat-messages">
165
- {% if user_message %}
166
- <div class="chat-message user-message">{{ user_message }}</div>
167
- {% endif %}
168
  {% if bot_response %}
169
- <div class="chat-message bot-message">{{ bot_response }}</div>
170
  {% endif %}
171
  </div>
172
  <div class="textarea-container">
173
  <form action="/Query.html" method="post" enctype="multipart/form-data">
174
  <div class="form-wrapper">
175
- <textarea name="message-input" id="message-input" placeholder="Type your message here"></textarea>
176
  <input type="file" id="file-input" name="file-input"/>
177
- <button type="submit" class="send-button">Send</button>
178
  </div>
179
  </form>
180
  </div>
181
  </div>
182
  </div>
183
- <script>
184
- document.getElementById("file-input").addEventListener("change", function() {
185
- const fileInput = document.getElementById("file-input");
186
- const messageInput = document.getElementById("message-input");
187
- if (fileInput.files.length > 0) {
188
- messageInput.value = "";
189
- }
190
- });
191
- </script>
192
  </body>
193
- </html>
 
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>BLIP Image Captioning</title>
7
  <style>
8
  body {
9
  font-family: Arial, sans-serif;
 
12
  padding: 0;
13
  color: #333;
14
  }
 
15
  h1 {
16
  text-align: center;
17
  margin-top: 20px;
18
  font-size: 2em;
19
  color: #4a4a4a;
20
  }
 
21
  .container-box {
22
  display: flex;
23
  align-items: flex-start;
 
28
  border-radius: 8px;
29
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
30
  }
 
31
  .img-container {
32
  flex: 1;
33
  margin-right: 20px;
 
41
  align-items: center;
42
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
43
  }
 
44
  .img-container img {
45
  max-width: 100%;
46
  max-height: 100%;
47
  object-fit: cover;
48
  border-radius: 8px;
49
  }
 
50
  .chat-container {
51
  flex: 2;
52
  display: flex;
53
  flex-direction: column;
54
  max-width: 600px;
55
  }
 
56
  .chat-message {
57
  margin: 10px 0;
58
  padding: 10px;
 
60
  max-width: 100%;
61
  word-wrap: break-word;
62
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
 
 
 
 
 
 
 
 
63
  background-color: #e3e3e3;
64
  align-self: flex-start;
65
  }
 
66
  .textarea-container {
67
  margin-top: 20px;
68
  }
 
 
 
 
 
 
 
 
 
 
 
 
69
  .textarea-container input[type="file"] {
70
  display: block;
71
  margin: 10px 0;
 
75
  background-color: #f9f9f9;
76
  cursor: pointer;
77
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  .textarea-container button.send-button {
79
  display: inline-block;
80
  padding: 10px 20px;
 
85
  font-size: 16px;
86
  cursor: pointer;
87
  }
 
88
  .textarea-container button.send-button:hover {
89
  background-color: #218838;
90
  }
 
91
  .form-wrapper {
92
  display: flex;
93
  flex-direction: column;
 
115
  </div>
116
  <div class="chat-container" id="chat-container">
117
  <div class="chat-messages">
 
 
 
118
  {% if bot_response %}
119
+ <div class="chat-message">{{ bot_response }}</div>
120
  {% endif %}
121
  </div>
122
  <div class="textarea-container">
123
  <form action="/Query.html" method="post" enctype="multipart/form-data">
124
  <div class="form-wrapper">
 
125
  <input type="file" id="file-input" name="file-input"/>
126
+ <button type="submit" class="send-button">Generate Caption</button>
127
  </div>
128
  </form>
129
  </div>
130
  </div>
131
  </div>
 
 
 
 
 
 
 
 
 
132
  </body>
133
+ </html>