customized design is finalized
Browse files- static/icon.png +0 -0
- templates/index.html +99 -0
static/icon.png
ADDED
|
|
templates/index.html
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Bangla AI Text Summarizer</title>
|
| 7 |
+
<!-- Bootstrap CSS -->
|
| 8 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
+
<!-- Font Awesome -->
|
| 10 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 11 |
+
<!-- Google Fonts: Poppins -->
|
| 12 |
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
|
| 13 |
+
<!-- Tailwind CSS -->
|
| 14 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 15 |
+
<script>
|
| 16 |
+
tailwind.config = {
|
| 17 |
+
theme: {
|
| 18 |
+
extend: {
|
| 19 |
+
colors: {
|
| 20 |
+
'dark-bg': '#1f2c34',
|
| 21 |
+
'dark-bg-alt': '#1b1b2f',
|
| 22 |
+
'chat-bg': '#222831',
|
| 23 |
+
'header-bg': '#30475e',
|
| 24 |
+
'footer-bg': '#393e46',
|
| 25 |
+
'accent': '#00adb5',
|
| 26 |
+
'accent-hover': '#00b8c4',
|
| 27 |
+
'dark-light': '#393e46',
|
| 28 |
+
'text-light': '#eeeeee',
|
| 29 |
+
},
|
| 30 |
+
},
|
| 31 |
+
},
|
| 32 |
+
};
|
| 33 |
+
</script>
|
| 34 |
+
</head>
|
| 35 |
+
<body class="font-poppins bg-gradient-to-br from-dark-bg to-dark-bg-alt min-h-screen">
|
| 36 |
+
|
| 37 |
+
<div class="chat-container flex justify-center items-center min-h-screen p-5">
|
| 38 |
+
<div class="chat-box w-[550px] max-w-[95%] h-[750px] bg-chat-bg rounded-3xl flex flex-col overflow-hidden shadow-2xl">
|
| 39 |
+
<div class="chat-header flex items-center p-4 bg-header-bg text-white rounded-t-3xl">
|
| 40 |
+
<img src="{{ url_for('static', filename='icon.png') }}" class="chat-avatar w-[55px] h-[55px] mr-3">
|
| 41 |
+
<div>
|
| 42 |
+
<h5 class="mb-0 text-lg font-semibold">Bangla LLM Text Summarizer</h5>
|
| 43 |
+
<small class="text-white/80 text-sm">Powered by Shanin</small>
|
| 44 |
+
</div>
|
| 45 |
+
</div>
|
| 46 |
+
|
| 47 |
+
<div id="chatBody" class="chat-body flex-1 overflow-y-auto p-4">
|
| 48 |
+
<!-- Messages will appear here -->
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
<div class="chat-footer p-4 bg-footer-bg rounded-b-3xl">
|
| 52 |
+
<form id="messageForm" class="flex">
|
| 53 |
+
<input type="text" id="text" name="msg" class="form-control flex-1 rounded-full px-4 py-3 bg-chat-bg border border-accent text-text-light placeholder:text-text-light/50 focus:outline-none focus:ring-0 me-2" placeholder="Type a message..." required>
|
| 54 |
+
<button type="submit" class="btn btn-accent rounded-full bg-accent text-white px-5 py-3 hover:bg-accent-hover"><i class="fas fa-paper-plane"></i></button>
|
| 55 |
+
</form>
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<!-- jQuery -->
|
| 61 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
| 62 |
+
<!-- Bootstrap JS -->
|
| 63 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js"></script>
|
| 64 |
+
|
| 65 |
+
<script>
|
| 66 |
+
$(document).ready(function() {
|
| 67 |
+
$("#messageForm").on("submit", function(event) {
|
| 68 |
+
event.preventDefault();
|
| 69 |
+
|
| 70 |
+
const date = new Date();
|
| 71 |
+
const str_time = date.getHours().toString().padStart(2,'0') + ":" + date.getMinutes().toString().padStart(2,'0');
|
| 72 |
+
const rawText = $("#text").val();
|
| 73 |
+
$("#text").val("");
|
| 74 |
+
|
| 75 |
+
// User message
|
| 76 |
+
const userHtml = `
|
| 77 |
+
<div class="message user-message mb-3 flex justify-end">
|
| 78 |
+
<div class="msg-text bg-accent text-white p-3 rounded-3xl max-w-[80%] break-words shadow-md relative">
|
| 79 |
+
${rawText} <span class="time text-[10px] absolute -bottom-4 right-2 text-white/50">${str_time}</span>
|
| 80 |
+
</div>
|
| 81 |
+
</div>`;
|
| 82 |
+
$("#chatBody").append(userHtml).scrollTop($("#chatBody")[0].scrollHeight);
|
| 83 |
+
|
| 84 |
+
// Call Flask API
|
| 85 |
+
$.post("/get", { msg: rawText }, function(data) {
|
| 86 |
+
const botHtml = `
|
| 87 |
+
<div class="message bot-message mb-3 flex justify-start">
|
| 88 |
+
<div class="msg-text bg-dark-light text-text-light p-3 rounded-3xl max-w-[80%] break-words shadow-md relative">
|
| 89 |
+
${data} <span class="time text-[10px] absolute -bottom-4 right-2 text-white/50">${str_time}</span>
|
| 90 |
+
</div>
|
| 91 |
+
</div>`;
|
| 92 |
+
$("#chatBody").append(botHtml).scrollTop($("#chatBody")[0].scrollHeight);
|
| 93 |
+
});
|
| 94 |
+
});
|
| 95 |
+
});
|
| 96 |
+
</script>
|
| 97 |
+
|
| 98 |
+
</body>
|
| 99 |
+
</html>
|