chabane commited on
Commit
180dc07
·
1 Parent(s): b16dcae

Update the UI and main

Browse files
main.py CHANGED
@@ -81,13 +81,13 @@ def index(req:Request):
81
  return templates.TemplateResponse('index.html',{'request':req})
82
  @app.get("/summarization",response_class=HTMLResponse)
83
  def index(req:Request):
84
- return templates.TemplateResponse('Summarization.html',{'request':req})
85
  @app.get("/datavisualisation",response_class=HTMLResponse)
86
  def index(req:Request):
87
- return templates.TemplateResponse('DataVisualisation.html',{'request':req})
88
  @app.get("/imageinterpretation",response_class=HTMLResponse)
89
  def index(req:Request):
90
- return templates.TemplateResponse('ImageInterpretation.html',{'request':req})
91
 
92
 
93
 
@@ -109,13 +109,13 @@ def interpret(file_img:UploadFile=File(...)):
109
  return JSONResponse(content={"caption": caption[0]['generated_text']},status_code=200)
110
 
111
  @app.post("/summerize")
112
- async def summerzation(file:UploadFile=File(...)):
113
  try:
114
  extension = file.filename.split(".")[-1]
115
  supported_ext=["pdf","xlxs","docx","ppt"]
116
  if extension not in supported_ext :
117
  return JSONResponse(content={"error": "Unsupported file type"},status_code=400)
118
- file_bytes = await file.file.read()
119
  if len(file_bytes) > MAX_SIZE :
120
  return JSONResponse(content={"error": "too large file "},status_code=400)
121
  if extension == "pdf":
@@ -178,7 +178,6 @@ df.dtypes:{df.dtypes.to_dict()}
178
  -you have to extract the column names and the plot type from the prompt bellow and use them in the code.
179
  -if the user task is not clear or there is an error like the column names are not in the dataframe, raise an
180
  error.
181
-
182
  ##Prompt: {user_need}.
183
  """
184
  global generator
@@ -202,7 +201,7 @@ error.
202
  plt.savefig(buf, format='png')
203
  buf.seek(0)
204
  base64_image = base64.b64encode(buf.getvalue()).decode('utf-8')
205
- return JSONResponse(content={"plot": f"data:image/png;base64,{base64_image}"},status_code=200)
206
  except Exception as e:
207
  print(e)
208
  return JSONResponse(content={"error": str(e) },status_code=500)
 
81
  return templates.TemplateResponse('index.html',{'request':req})
82
  @app.get("/summarization",response_class=HTMLResponse)
83
  def index(req:Request):
84
+ return templates.TemplateResponse('text-summarization.html',{'request':req})
85
  @app.get("/datavisualisation",response_class=HTMLResponse)
86
  def index(req:Request):
87
+ return templates.TemplateResponse('data-visualization.html',{'request':req})
88
  @app.get("/imageinterpretation",response_class=HTMLResponse)
89
  def index(req:Request):
90
+ return templates.TemplateResponse('image-interpretation.html',{'request':req})
91
 
92
 
93
 
 
109
  return JSONResponse(content={"caption": caption[0]['generated_text']},status_code=200)
110
 
111
  @app.post("/summerize")
112
+ def summerzation(file:UploadFile=File(...)):
113
  try:
114
  extension = file.filename.split(".")[-1]
115
  supported_ext=["pdf","xlxs","docx","ppt"]
116
  if extension not in supported_ext :
117
  return JSONResponse(content={"error": "Unsupported file type"},status_code=400)
118
+ file_bytes = file.file.read()
119
  if len(file_bytes) > MAX_SIZE :
120
  return JSONResponse(content={"error": "too large file "},status_code=400)
121
  if extension == "pdf":
 
178
  -you have to extract the column names and the plot type from the prompt bellow and use them in the code.
179
  -if the user task is not clear or there is an error like the column names are not in the dataframe, raise an
180
  error.
 
181
  ##Prompt: {user_need}.
182
  """
183
  global generator
 
201
  plt.savefig(buf, format='png')
202
  buf.seek(0)
203
  base64_image = base64.b64encode(buf.getvalue()).decode('utf-8')
204
+ return JSONResponse(content={"plot": f"data:image/png;base64,{base64_image}",'code':code},status_code=200)
205
  except Exception as e:
206
  print(e)
207
  return JSONResponse(content={"error": str(e) },status_code=500)
static/assests/1694502952506.jpg DELETED

Git LFS Details

  • SHA256: 0c698b01a6e1c6341b7b06ae53be1ff74d8a7dfc89203dde34a998ea790638f2
  • Pointer size: 131 Bytes
  • Size of remote file: 270 kB
static/assests/Ilus.svg DELETED
static/assests/Ilust.svg DELETED
static/assests/g.svg DELETED
static/assests/graph icon.svg DELETED
static/assests/icon.svg DELETED
static/assests/image icon.svg DELETED
static/scripts/ImageInterpretation.js ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener("DOMContentLoaded", function () {
2
+ const fileInput = document.getElementById("image-upload");
3
+ const fileName = document.getElementById("file-name");
4
+ const imagePreviewContainer = document.getElementById(
5
+ "image-preview-container"
6
+ );
7
+ const imagePreview = document.getElementById("image-preview");
8
+ const interpretBtn = document.getElementById("interpret-btn");
9
+ const loadingContainer = document.getElementById("loading-container");
10
+ const resultsSection = document.getElementById("results-section");
11
+ const resultsImage = document.getElementById("results-image");
12
+ const interpretationContent = document.querySelector(
13
+ "#interpretation-content"
14
+ );
15
+ const newInterpretationBtn = document.getElementById(
16
+ "new-interpretation-btn"
17
+ );
18
+ const downloadBtn = document.getElementById("download-btn");
19
+
20
+ fileInput.addEventListener("change", function () {
21
+ if (this.files && this.files[0]) {
22
+ const file = this.files[0];
23
+ fileName.textContent = file.name;
24
+
25
+ const reader = new FileReader();
26
+ reader.onload = function (e) {
27
+ imagePreview.src = e.target.result;
28
+ imagePreviewContainer.style.display = "block";
29
+ };
30
+ reader.readAsDataURL(file);
31
+ } else {
32
+ fileName.textContent = "No image chosen";
33
+ imagePreviewContainer.style.display = "none";
34
+ }
35
+ });
36
+
37
+ interpretBtn.addEventListener("click", async function (e) {
38
+ try {
39
+ e.preventDefault();
40
+ if (fileInput.files.length === 0) {
41
+ showNotification("warning", "no Image selected");
42
+ return;
43
+ }
44
+
45
+ loadingContainer.style.display = "block";
46
+ interpretBtn.disabled = true;
47
+ const formData = new FormData();
48
+ formData.append("file_img", fileInput.files[0]);
49
+ const response = await fetch("/interpret", {
50
+ method: "POST",
51
+ body: formData,
52
+ });
53
+ const result = await response.json();
54
+
55
+ if (result.error) {
56
+ showNotification("error", result.error);
57
+ return;
58
+ }
59
+ resultsImage.src = imagePreview.src;
60
+ interpretationContent.innerText = result.caption;
61
+ resultsSection.style.display = "block";
62
+ resultsSection.scrollIntoView({ behavior: "smooth" });
63
+ } catch (error) {
64
+ showNotification("error", error);
65
+ } finally {
66
+ loadingContainer.style.display = "none";
67
+ interpretBtn.disabled = false;
68
+ }
69
+ });
70
+
71
+ newInterpretationBtn.addEventListener("click", function () {
72
+ fileInput.files = [];
73
+ fileName.textContent = "No image chosen";
74
+ imagePreviewContainer.style.display = "none";
75
+ resultsSection.style.display = "none";
76
+ document.querySelector(".upload").scrollIntoView({ behavior: "smooth" });
77
+ });
78
+
79
+ downloadBtn.addEventListener("click", function () {
80
+ const interpretationText = interpretationContent.innerText;
81
+ const blob = new Blob([interpretationText], { type: "text/plain" });
82
+ const url = URL.createObjectURL(blob);
83
+
84
+ const a = document.createElement("a");
85
+ a.href = url;
86
+ a.download = "image-interpretation.txt";
87
+ document.body.appendChild(a);
88
+ a.click();
89
+ document.body.removeChild(a);
90
+ URL.revokeObjectURL(url);
91
+ });
92
+ });
static/scripts/data-visualisation.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener("DOMContentLoaded", function () {
2
+ const fileInput = document.getElementById("data-upload");
3
+ const fileName = document.getElementById("file-name");
4
+ const promptInput = document.getElementById("visualization-prompt");
5
+ const visualizeBtn = document.getElementById("visualize-btn");
6
+ const loadingContainer = document.getElementById("loading-container");
7
+ const resultsSection = document.getElementById("results-section");
8
+ const img_chart = document.getElementById("results-chart");
9
+ const newVisualizationBtn = document.getElementById("new-visualization-btn");
10
+ const downloadChartBtn = document.getElementById("download-chart-btn");
11
+ const downloadCodeBtn = document.getElementById("download-code-btn");
12
+
13
+ fileInput.addEventListener("change", function () {
14
+ if (this.files && this.files[0]) {
15
+ fileName.textContent = this.files[0].name;
16
+ } else {
17
+ fileName.textContent = "No Data chosen";
18
+ }
19
+ });
20
+
21
+ visualizeBtn.addEventListener("click", async function () {
22
+ try {
23
+ if (fileInput.files.length === 0) {
24
+ showNotification("warning", "No file chosen ...");
25
+ return;
26
+ }
27
+ const prompt = promptInput.value.trim();
28
+ if (!prompt) {
29
+ showNotification("warning", "discribe your needs ...");
30
+ return;
31
+ }
32
+
33
+ loadingContainer.style.display = "block";
34
+ visualizeBtn.disabled = true;
35
+
36
+ const formdata = new FormData();
37
+ formdata.append("file", fileInput.files[0]);
38
+ formdata.append("user_need", prompt);
39
+ const response = await fetch("/plot", {
40
+ method: "POST",
41
+ body: formData,
42
+ });
43
+ const result = await response.json();
44
+
45
+ if (result.error) {
46
+ showNotification("error", result.error);
47
+ return;
48
+ }
49
+ img_chart.src = result.plot;
50
+ resultsSection.style.display = "block";
51
+ resultsSection.scrollIntoView({ behavior: "smooth" });
52
+ } catch (error) {
53
+ showNotification("error", error);
54
+ } finally {
55
+ loadingContainer.style.display = "none";
56
+ visualizeBtn.disabled = false;
57
+ }
58
+ });
59
+
60
+ newVisualizationBtn.addEventListener("click", function () {
61
+ fileInput.files = [];
62
+ //fileName.textContent = "No Data chosen";
63
+ promptInput.value = "";
64
+ resultsSection.style.display = "none";
65
+
66
+ document.querySelector(".upload").scrollIntoView({ behavior: "smooth" });
67
+ });
68
+
69
+ downloadChartBtn.addEventListener("click", function () {
70
+ const link = document.createElement("a");
71
+ link.download = "chart_visualization.png";
72
+ link.href = img_chart.src;
73
+ document.body.appendChild(link);
74
+ link.click();
75
+ document.body.removeChild(link);
76
+ });
77
+
78
+ downloadCodeBtn.addEventListener("click", function () {
79
+ const codeContent = document.getElementById("code-content").innerText;
80
+ const blob = new Blob([codeContent], { type: "text/plain" });
81
+ const url = URL.createObjectURL(blob);
82
+
83
+ const a = document.createElement("a");
84
+ a.href = url;
85
+ a.download = "visualization_code.py";
86
+ document.body.appendChild(a);
87
+ a.click();
88
+ document.body.removeChild(a);
89
+ URL.revokeObjectURL(url);
90
+ });
91
+ });
static/scripts/dataViz.js DELETED
@@ -1,99 +0,0 @@
1
- const fileContainer = document.querySelector(".file-container");
2
- const label = document.querySelector("#label-input");
3
- const inputFile = document.querySelector("#document-input");
4
- const form = document.querySelector("form");
5
- const prompt_txt = document.querySelector("#text-prompt");
6
- const result_section = document.querySelector(".result");
7
- const chart_wrapper = result_section.querySelector(".chart-wrapper");
8
-
9
- let file = null;
10
- const notifications = document.querySelector(".notifications");
11
- const toast = (message, type) => {
12
- const notification = document.createElement("div");
13
-
14
- notification.innerHTML = `
15
- <i class="fa fa-xmark close" onclick="this.parentNode.remove()"></i>
16
- <i class="fa-solid ${
17
- type === "error" ? "fa-circle-xmark" : "fa-triangle-exclamation"
18
- } icon"></i>
19
-
20
- <div class="notification-content">
21
- <h3>${type}</h3>
22
- <p>${message}</p>
23
- </div>
24
- `;
25
- notification.classList.add(...["notification", type]);
26
- notifications.appendChild(notification);
27
- setTimeout(() => {
28
- notification.remove();
29
- }, 10000);
30
- };
31
-
32
- function clear() {
33
- file = null;
34
- label.style.display = "flex";
35
- fileContainer.innerHTML = "";
36
- }
37
- const upload = (fileData) => {
38
- file = fileData;
39
- const ext = file.name.split(".").pop();
40
-
41
- if (ext === "pdf") {
42
- label.style.display = "none";
43
- fileContainer.innerHTML = `
44
- <div class="file-wrapper">
45
- <i class="fa fa-file-excel"></i>
46
- <p>
47
- ${file.name}
48
- </p>
49
- <button id='btn-clear' type="button" ><i class="fa fa-close" ></i></button>
50
- </div>
51
- `;
52
- document
53
- .querySelector("#btn-clear")
54
- .addEventListener("click", (e) => clear(e));
55
- } else {
56
- console.error("file is not supported");
57
- toast("file is not supported", "error");
58
- }
59
- };
60
-
61
- inputFile.addEventListener("change", (e) => {
62
- e.preventDefault();
63
- if (inputFile.files[0]) upload(inputFile.files[0]);
64
- });
65
-
66
- label.addEventListener("dragover", (e) => {
67
- e.preventDefault();
68
- });
69
- label.addEventListener("drop", (e) => {
70
- e.preventDefault();
71
- if (e.dataTransfer.files[0]) upload(e.dataTransfer.files[0]);
72
- });
73
- form.addEventListener("submit", (e) => {
74
- e.preventDefault();
75
- /*const prompt = prompt_txt.value.trim();
76
- if (prompt && file) {
77
- showchart("");
78
- } else {
79
- console.log("no file selected or no prompted");
80
- }*/
81
- });
82
- const showchart = (url) => {
83
- chart_wrapper.innerHTML = `
84
- <i class="fas fa-download" id="btn-download" onclick='download()'></i>
85
- <img src=${url} id="chart">
86
- `;
87
- result_section.style.display = "block";
88
- result_section.scrollIntoView({ behavior: "smooth" });
89
- };
90
-
91
- const download = () => {
92
- const imageurl = document.querySelector("#chart").src;
93
- const a = document.createElement("a");
94
- a.href = imageurl;
95
- a.download = "SmartDoc-chart.jpg";
96
- document.body.appendChild(a);
97
- a.click();
98
- document.body.removeChild(a);
99
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/scripts/image_iterpretation.js DELETED
@@ -1,95 +0,0 @@
1
- const notifications = document.querySelector(".notifications");
2
- const fileContainer = document.querySelector(".file-container");
3
- const label = document.querySelector("#label-input");
4
- const inputFile = document.querySelector("#document-input");
5
- const form = document.querySelector("form");
6
-
7
- const result_img = document.querySelector(".result_img");
8
- const img_wrapper = document.querySelector(".img-wrapper");
9
- const text_result = document.querySelector(".result-text");
10
-
11
- const toast = (message, type) => {
12
- const notification = document.createElement("div");
13
-
14
- notification.innerHTML = `
15
- <i class="fa fa-xmark close" onclick="this.parentNode.remove()"></i>
16
- <i class="fa-solid ${
17
- type === "error" ? "fa-circle-xmark" : "fa-triangle-exclamation"
18
- } icon"></i>
19
-
20
- <div class="notification-content">
21
- <h3>${type}</h3>
22
- <p>${message}</p>
23
- </div>
24
- `;
25
- notification.classList.add(...["notification", type]);
26
- notifications.appendChild(notification);
27
- setTimeout(() => {
28
- notification.remove();
29
- }, 5000);
30
- };
31
-
32
- let file = null;
33
- const SUPPORTED_EXT = ["jpg", "png", "jpeg"];
34
-
35
- function clear() {
36
- file = null;
37
- label.style.display = "flex";
38
- fileContainer.innerHTML = "";
39
- }
40
- const upload = (fileData) => {
41
- file = fileData;
42
- const ext = file.name.split(".").pop();
43
- let isvalid = SUPPORTED_EXT.some((s_ext) => s_ext === ext);
44
- if (isvalid) {
45
- label.style.display = "none";
46
- fileContainer.innerHTML = `
47
- <div class="file-wrapper">
48
- <i class="fa fa-file-image"></i>
49
- <p>
50
- ${file.name}
51
- </p>
52
- <button id='btn-clear' type="button" ><i class="fa fa-close" ></i></button>
53
- </div>
54
- `;
55
- document
56
- .querySelector("#btn-clear")
57
- .addEventListener("click", (e) => clear(e));
58
- } else {
59
- console.error("file is not supported");
60
- toast("file is not supported", "error");
61
- }
62
- };
63
-
64
- inputFile.addEventListener("change", (e) => {
65
- e.preventDefault();
66
- if (inputFile.files[0]) upload(inputFile.files[0]);
67
- });
68
-
69
- label.addEventListener("dragover", (e) => {
70
- e.preventDefault();
71
- });
72
- label.addEventListener("drop", (e) => {
73
- e.preventDefault();
74
- upload(e.dataTransfer.files[0]);
75
- });
76
- form.addEventListener("submit", async (e) => {
77
- e.preventDefault();
78
- if (!file) {
79
- toast("No Image selected ...", "warning");
80
- } else {
81
- const data = new FormData();
82
- data.append("file_img", file);
83
- const response = await fetch("/interpret", {
84
- method: "post",
85
- body: data,
86
- });
87
- const result = await response.json();
88
- if (result.error) {
89
- toast(result.error, "error");
90
- console.log(result.error);
91
- return;
92
- }
93
- text_result.innerHTML = result.caption;
94
- }
95
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/scripts/notifcation.js ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function showNotification(type, message, duration = 5000) {
2
+ const container = document.querySelector(".notification-container");
3
+ const notification = document.createElement("div");
4
+ notification.classList.add("notification", `notification-${type}`);
5
+ notification.innerHTML = `
6
+ <div class="notification-icon">${getIconForType(type)}</div>
7
+ <div class="notification-content">
8
+ <div class="notification-title">${type}</div>
9
+ <div class="notification-message">${message}</div>
10
+ </div>
11
+ <button class="notification-close" onclick='this.parentNode.remove()' aria-label="Close notification">X</button>`;
12
+
13
+ container.appendChild(notification);
14
+ if (duration > 0) {
15
+ setTimeout(() => {
16
+ closeNotification(notification);
17
+ }, duration);
18
+ }
19
+ }
20
+
21
+ function closeNotification(notification) {
22
+ notification.classList.add("hide");
23
+ setTimeout(() => {
24
+ notification.remove();
25
+ }, 300);
26
+ }
27
+
28
+ function getIconForType(type) {
29
+ switch (type) {
30
+ case "error":
31
+ return "❌";
32
+ case "warning":
33
+ return "⚠️";
34
+ case "success":
35
+ return "✅";
36
+ case "info":
37
+ return "ℹ️";
38
+ default:
39
+ return "";
40
+ }
41
+ }
static/scripts/notification.js DELETED
@@ -1,22 +0,0 @@
1
- const wrapper = document.querySelector(".notifications");
2
-
3
- const toast = (message, type) => {
4
- const notification = document.createElement("div");
5
-
6
- notification.innerHTML = `
7
- <i class="fa fa-xmark close" onclick="this.parentNode.remove()"></i>
8
- <i class="fa-solid ${
9
- type === "error" ? "fa-circle-xmark" : "fa-triangle-exclamation"
10
- } icon"></i>
11
-
12
- <div class="notification-content">
13
- <h3>${type}</h3>
14
- <p>${message}</p>
15
- </div>
16
- `;
17
- notification.classList.add(...["notification", type]);
18
- wrapper.appendChild(notification);
19
- setTimeout(() => {
20
- notification.remove();
21
- }, 10000);
22
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/scripts/summerize.js DELETED
@@ -1,106 +0,0 @@
1
- const label = document.querySelector("#label-input");
2
- const inputfile = label.querySelector("#document-input");
3
- const fileContainer = document.querySelector(".file-container");
4
- const form = document.querySelector("form");
5
- const summary_section = document.querySelector("#summary");
6
- const btnDounload = summary_section.querySelector("#btn-download");
7
-
8
- let file = null;
9
- const SUPPORTED_EXT = ["pdf", "docx", "pptx", "xlsx"];
10
-
11
- const getfileicon = (ext) => {
12
- return ext === "pdf"
13
- ? "fa-file-pdf"
14
- : ext === "xlsx"
15
- ? "fa-file-excel"
16
- : ext === "pptx"
17
- ? "fa-file-powerpoint"
18
- : "fa-file-word";
19
- };
20
-
21
- const upload = (filedata) => {
22
- file = filedata;
23
- const [name, ext] = file.name.split(".");
24
-
25
- const isvalid = SUPPORTED_EXT.some((s_ext) => s_ext === ext);
26
- if (isvalid) {
27
- label.style.display = "none";
28
- fileContainer.innerHTML = `
29
- <div class="file-wrapper">
30
- <i class="fa ${getfileicon(ext)}"></i>
31
- <p>
32
- ${name}
33
- </p>
34
- <button id='btn-clear'><i class="fa fa-close"></i></button>
35
- </div>
36
- `;
37
- document.querySelector("#btn-clear").addEventListener("click", (e) => {
38
- e.preventDefault();
39
- file = null;
40
- label.style.display = "flex";
41
- fileContainer.innerHTML = "";
42
- });
43
- } else {
44
- console.error("file is not supported");
45
- }
46
- };
47
-
48
- inputfile.addEventListener("change", (e) => {
49
- e.preventDefault();
50
- upload(inputfile.files[0]);
51
- });
52
-
53
- label.addEventListener("dragover", (e) => {
54
- e.preventDefault();
55
- });
56
- label.addEventListener("drop", (e) => {
57
- e.preventDefault();
58
- upload(e.dataTransfer.files[0]);
59
- });
60
-
61
- form.addEventListener("submit", async (e) => {
62
- e.preventDefault();
63
- /*if (file === null) {
64
- console.error("No file choosed");
65
- } else {
66
- /*const formData = new FormData();
67
- formData.append("file", file);
68
- const res = await fetch("/summarize", {
69
- method: "post",
70
- body: formData,
71
- });
72
- const data = await res.json();
73
- console.log(data.text);*/
74
- summary_section.style.display = "block";
75
- const text = ` Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos,
76
- nulla quia vitae officia, repudiandae eum inventore facilis sunt
77
- aliquid dolorem enim placeat ex cumque mollitia necessitatibus
78
- voluptatem aut provident assumenda? Eius delectus cum, minus
79
- voluptate eos laborum odio dolorum! Nulla excepturi laboriosam
80
- atque aliquid placeat vero enim doloribus quas, repudiandae
81
- vo`;
82
-
83
- summary_section.scrollIntoView({ behavior: "smooth" });
84
-
85
- typing(
86
- text,
87
- summary_section.querySelector(".text-wrapper"),
88
- summary_section.querySelector(".summary-content")
89
- );
90
-
91
- // }
92
- });
93
-
94
- const typing = (text, element, parent) => {
95
- const textsplit = text.split(" ");
96
-
97
- const interval = setInterval(() => {
98
- if (textsplit.length > 0) {
99
- element.innerHTML += `${textsplit.shift()} `;
100
- parent.scrollIntoView({ behavior: "smooth" });
101
- element.scrollIntoView({ behavior: "smooth" });
102
- } else {
103
- clearInterval(interval);
104
- }
105
- }, 50);
106
- };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/scripts/text-summarization.js ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener("DOMContentLoaded", function () {
2
+ const fileInput = document.getElementById("document-upload");
3
+ const fileName = document.getElementById("file-name");
4
+ const summarizeBtn = document.getElementById("summarize-btn");
5
+ const loadingContainer = document.getElementById("loading-container");
6
+ const resultsSection = document.getElementById("results-section");
7
+ const result_summary = document.getElementById("summary-content");
8
+ const newSummaryBtn = document.getElementById("new-summary-btn");
9
+ const downloadBtn = document.getElementById("download-btn");
10
+
11
+ fileInput.addEventListener("change", function () {
12
+ if (this.files && this.files[0]) {
13
+ fileName.textContent = this.files[0].name;
14
+ } else {
15
+ fileName.textContent = "No file chosen";
16
+ }
17
+ });
18
+
19
+ summarizeBtn.addEventListener("click", async function () {
20
+ try {
21
+ if (fileInput.files.length === 0) {
22
+ showNotification("warning", "Please select a file first");
23
+ return;
24
+ }
25
+
26
+ loadingContainer.style.display = "block";
27
+ summarizeBtn.disabled = true;
28
+ const formData = new FormData();
29
+ formData.append("file", fileInput.files[0]);
30
+ const response = await fetch("/summerize", {
31
+ method: "POST",
32
+ body: formData,
33
+ });
34
+ const result = await response.json();
35
+
36
+ if (result.error) {
37
+ showNotification("error", result.error);
38
+ return;
39
+ }
40
+ result_summary.innerText = result.summary;
41
+ resultsSection.style.display = "block";
42
+ resultsSection.scrollIntoView({ behavior: "smooth" });
43
+ } catch (error) {
44
+ showNotification("error", error);
45
+ } finally {
46
+ loadingContainer.style.display = "none";
47
+ summarizeBtn.disabled = false;
48
+ }
49
+ });
50
+
51
+ newSummaryBtn.addEventListener("click", function () {
52
+ fileInput.value = "";
53
+ fileName.textContent = "No file chosen";
54
+ resultsSection.style.display = "none";
55
+ document.querySelector(".upload").scrollIntoView({ behavior: "smooth" });
56
+ });
57
+
58
+ downloadBtn.addEventListener("click", function () {
59
+ const summaryText = document.getElementById("summary-content").innerText;
60
+ const blob = new Blob([summaryText], { type: "text/plain" });
61
+ const url = URL.createObjectURL(blob);
62
+
63
+ const a = document.createElement("a");
64
+ a.href = url;
65
+ a.download = "document-summary.txt";
66
+ document.body.appendChild(a);
67
+ a.click();
68
+ document.body.removeChild(a);
69
+ URL.revokeObjectURL(url);
70
+ });
71
+ });
static/styles/features.css DELETED
@@ -1,553 +0,0 @@
1
- @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Romanesco&display=swap");
2
-
3
- *,
4
- *::after,
5
- *::before {
6
- margin: 0;
7
- padding: 0;
8
- box-sizing: border-box;
9
- }
10
-
11
- a {
12
- text-decoration: none;
13
- }
14
-
15
- :root {
16
- --primary: #0c042c;
17
- --secondary: #d1c10a;
18
- --helper: #c9c5e0;
19
-
20
- }
21
-
22
- html {
23
- scroll-behavior: smooth;
24
- font-size: 20px;
25
- }
26
-
27
- body {
28
- font-family: "Roboto";
29
- }
30
-
31
- .container {
32
- width: 80%;
33
- margin: 0 auto;
34
- }
35
-
36
- .title {
37
- font-size: 30px;
38
- text-align: center;
39
- text-shadow: 2px 4px 0 rgba(72, 71, 71, 0.529);
40
- color: var(--primary);
41
- margin: 50px 0;
42
- }
43
-
44
- header {
45
- background-color: var(--primary);
46
- }
47
-
48
- header .container a {
49
- font-family: "Romanesco", system-ui, -apple-system, BlinkMacSystemFont,
50
- "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
51
- sans-serif;
52
- font-size: 2.5rem;
53
- color: var(--secondary);
54
- cursor: pointer;
55
- }
56
-
57
- .hero {
58
- min-height: 77vh;
59
- position: relative;
60
- background-color: var(--primary);
61
- display: flex;
62
- justify-content: center;
63
- align-items: center;
64
- overflow: hidden;
65
- }
66
-
67
- .hero img {
68
- position: absolute;
69
-
70
- left: -100px;
71
- width: 100%;
72
- top: 42%;
73
- opacity: 0.4;
74
- }
75
-
76
- .hero .hero-content {
77
- padding: 10px 20px;
78
- color: var(--secondary);
79
- text-align: center;
80
- transform: translateY(-50px);
81
- }
82
-
83
- .hero .hero-content h1 {
84
- font-size: 2rem;
85
- font-weight: 900;
86
- letter-spacing: 2px;
87
- margin-bottom: 20px;
88
- }
89
-
90
- .hero .hero-content h3 {
91
- font-size: 1.5rem;
92
- font-weight: 200;
93
- letter-spacing: 4px;
94
- margin-bottom: 20px;
95
- }
96
-
97
- .hero .hero-content p {
98
- font-size: 0.85rem;
99
- font-weight: 200;
100
- letter-spacing: 4px;
101
- margin-bottom: 20px;
102
- }
103
-
104
- .raisons {
105
- background-color: var(--helper);
106
- padding: 20px 0;
107
- }
108
-
109
- .raisons-content .raisons-wrapper {
110
- padding: 10px 0;
111
- display: flex;
112
- flex-direction: column;
113
- gap: 20px;
114
- }
115
-
116
- .raison {
117
- display: flex;
118
- align-items: center;
119
- padding: 20px;
120
- box-shadow: 0 0 8px black;
121
- border-radius: 8px;
122
- gap: 30px;
123
- transition: transform 0.5s;
124
- background-color: white;
125
- }
126
-
127
- .raison:hover {
128
- transform: scale(1.05);
129
- }
130
-
131
- .raison i {
132
- font-size: 20px;
133
- color: green;
134
- }
135
-
136
- .raison p {
137
- font-size: 20px;
138
- font-weight: 500;
139
- text-transform: capitalize;
140
- }
141
-
142
- .steps {
143
- position: relative;
144
- min-height: fit-content;
145
- padding: 20px 0;
146
- overflow: hidden;
147
- }
148
-
149
- .steps img {
150
- width: 122%;
151
- top: 60%;
152
- left: -100px;
153
- transform: rotate(20deg);
154
- position: absolute;
155
- z-index: -1;
156
- opacity: 0.4;
157
- }
158
-
159
- .steps-content .steps-wrapper {
160
- display: flex;
161
- justify-content: center;
162
- align-items: center;
163
- flex-wrap: wrap;
164
- gap: 30px;
165
- margin-bottom: 50px;
166
- padding: 0 10px;
167
- }
168
-
169
- .steps-content .steps-wrapper .step {
170
- display: flex;
171
- color: var(--secondary);
172
- gap: 10px;
173
- padding: 20px;
174
-
175
- width: 270px;
176
- height: 150px;
177
- border-radius: 5px;
178
- background-color: var(--primary);
179
- box-shadow: 0 0 9px black;
180
- transition: transform 0.5s;
181
- }
182
-
183
- .steps-content .steps-wrapper .step:hover {
184
- transform: scale(1.05);
185
- }
186
-
187
- .steps-content .steps-wrapper .step span {
188
- font-size: 100px;
189
- display: flex;
190
- align-items: flex-end;
191
- font-family: "Romanesco";
192
- opacity: 0.4;
193
- }
194
-
195
- .steps-content .steps-wrapper .step p {
196
- font-size: 22px;
197
- flex: 1;
198
-
199
- text-align: center;
200
- display: flex;
201
- justify-content: center;
202
- align-items: center;
203
- }
204
-
205
- .upload {
206
- background-color: var(--helper);
207
- padding: 20px 0;
208
- }
209
-
210
- .upload .upload-content p {
211
- font-size: 20px;
212
- }
213
-
214
- .upload .upload-content .wrapper {
215
- padding: 20px 0;
216
- gap: 30px;
217
- margin-top: 20px;
218
- border: 1px solid var(--secondary);
219
- border-radius: 20px;
220
- background-color: #fff;
221
- }
222
-
223
- .upload .upload-content .wrapper .input-wrapper {
224
- display: flex;
225
- justify-content: center;
226
- align-items: center;
227
- margin-bottom: 20px;
228
- padding: 0 20px;
229
- }
230
-
231
- .upload .upload-content .wrapper .input-wrapper label {
232
- width: 100%;
233
- max-width: 350px;
234
- min-width: 200px;
235
- height: 150px;
236
- border-radius: 5px;
237
- border: 1px dashed var(--secondary);
238
- background-color: var(--primary);
239
- color: var(--secondary);
240
- display: flex;
241
- justify-content: center;
242
- align-items: center;
243
- flex-direction: column;
244
- text-align: center;
245
- gap: 10px;
246
- cursor: pointer;
247
- }
248
-
249
- .active {
250
- border: 3px solid var(--secondary);
251
- }
252
-
253
- .upload .upload-content .wrapper .input-wrapper label i {
254
- font-size: 50px;
255
- }
256
-
257
- .upload .upload-content .wrapper .input-wrapper label span {
258
- font-size: 17px;
259
- font-weight: 100;
260
- }
261
-
262
- .upload .upload-content .wrapper .btn-wrapper {
263
- text-align: center;
264
- padding: 0 20px;
265
- }
266
-
267
- .upload .upload-content .wrapper .btn-wrapper button {
268
- width: 100%;
269
- max-width: 350px;
270
- min-width: 200px;
271
- padding: 10px 0;
272
- cursor: pointer;
273
- font-size: 20px;
274
- font-weight: 600;
275
- color: var(--primary);
276
- background-color: var(--secondary);
277
- border-radius: 5px;
278
- outline: none;
279
- border: 1px solid transparent;
280
- transition: all 0.5s;
281
- }
282
-
283
- .upload .upload-content .wrapper .btn-wrapper button:hover {
284
- border-color: var(--primary);
285
- transform: scale(1.05);
286
- }
287
-
288
- .upload .upload-content .wrapper .file-container {
289
- display: flex;
290
- justify-content: center;
291
- align-items: center;
292
- margin-bottom: 20px;
293
- }
294
-
295
- .upload .upload-content .wrapper .file-container .file-wrapper {
296
- display: flex;
297
- position: relative;
298
- align-items: center;
299
- background-color: var(--primary);
300
- padding: 20px 10px;
301
- width: 350px;
302
- height: 65px;
303
- gap: 10px;
304
- color: var(--secondary);
305
- border-radius: 5px;
306
- }
307
-
308
- .upload .upload-content .wrapper .file-container .file-wrapper i {
309
- font-size: 35px;
310
- }
311
-
312
- .upload .upload-content .wrapper .file-container .file-wrapper p {
313
- flex: 1;
314
- font-size: 15px;
315
- overflow: scroll;
316
- scrollbar-width: none;
317
- }
318
-
319
- .upload .upload-content .wrapper .file-container .file-wrapper button {
320
- position: absolute;
321
- top: 0;
322
- right: 0;
323
- cursor: pointer;
324
- border-radius: 50%;
325
- padding: 2px 5px;
326
- background-color: var(--primary);
327
- color: var(--secondary);
328
- border: none;
329
- outline: none;
330
- transition: all 0.5s;
331
- }
332
-
333
- .upload .upload-content .wrapper .file-container .file-wrapper button i {
334
- font-size: 10px;
335
- }
336
-
337
- .upload .upload-content .wrapper .file-container .file-wrapper button:hover {
338
- background-color: var(--secondary);
339
- color: var(--primary);
340
- transform: scale(1.05);
341
- }
342
-
343
- .summary {
344
- padding: 20px 0;
345
- display: none;
346
- }
347
-
348
- .summary .summary-content {
349
- max-height: 40vh;
350
- display: flex;
351
- flex-direction: column;
352
- position: relative;
353
- }
354
-
355
- .summary .summary-content .summary-wrapper {
356
- background-color: var(--helper);
357
- border-radius: 5px;
358
- flex: 1;
359
-
360
- overflow-y: auto;
361
- scrollbar-width: none;
362
- }
363
-
364
- .summary .summary-content .summary-wrapper i {
365
- position: absolute;
366
- bottom: 10px;
367
- right: 10px;
368
- font-size: 20px;
369
- background-color: var(--primary);
370
- color: var(--helper);
371
- padding: 10px;
372
- border-radius: 50%;
373
- cursor: pointer;
374
- transition: transform 0.5s;
375
- }
376
-
377
- .summary .summary-content .summary-wrapper i:hover {
378
- transform: scale(1.1);
379
- background-color: var(--secondary);
380
- }
381
-
382
- .summary .summary-content .summary-wrapper p {
383
- text-align: start;
384
- line-height: 25px;
385
- padding: 20px 0;
386
- letter-spacing: 1.5px;
387
- width: 80%;
388
- margin: 0 auto;
389
- }
390
-
391
-
392
-
393
- .upload .upload-content .wrapper .prompt-wrapper {
394
- display: flex;
395
- align-items: center;
396
- width: 90%;
397
-
398
- max-width: 900px;
399
- min-width: 270px;
400
- height: 40px;
401
- margin: 0 auto;
402
- border: 1px solid var(--primary);
403
- border-radius: 5px;
404
- }
405
-
406
- .upload .upload-content .wrapper .prompt-wrapper input {
407
- flex: 1;
408
- height: 100%;
409
- padding: 0 15px;
410
- outline: none;
411
- font-size: 15px;
412
- border: none;
413
- border-radius: 5px 0 0 5px;
414
- }
415
-
416
- .upload .upload-content .wrapper .prompt-wrapper button {
417
- height: 100%;
418
- padding: 0 20px;
419
- font-size: 15px;
420
- font-weight: 500;
421
- outline: none;
422
- color: var(--primary);
423
- background-color: var(--secondary);
424
- border: none;
425
- cursor: pointer;
426
- transition: transform 0.5s;
427
- border-radius: 0 5px 5px 0;
428
- }
429
-
430
- .upload .upload-content .wrapper .prompt-wrapper button:hover {
431
- transform: scale(1.05);
432
- }
433
-
434
- .result {
435
-
436
- padding: 20px 0;
437
- }
438
-
439
- .result .result-content .chart-wrapper {
440
- display: flex;
441
- justify-content: center;
442
- align-items: center;
443
- position: relative;
444
- }
445
-
446
- .result .result-content .chart-wrapper i {
447
- position: absolute;
448
- bottom: 10px;
449
- right: 10px;
450
- font-size: 20px;
451
- background-color: var(--primary);
452
- color: var(--helper);
453
- padding: 10px;
454
- border-radius: 50%;
455
- cursor: pointer;
456
- transition: transform 0.5s;
457
- }
458
-
459
- .result .result-content .chart-wrapper i:hover {
460
- transform: scale(1.1);
461
- background-color: var(--secondary);
462
- }
463
-
464
- .result .result-content .chart-wrapper img {
465
- width: 50%;
466
- height: 40%;
467
- max-width: 600px;
468
- max-height: 500px;
469
- border-radius: 5px;
470
- }
471
-
472
- .result_img .result-content .img-wrapper {
473
- display: flex;
474
- justify-content: center;
475
- align-items: center;
476
- padding: 10px 0;
477
- }
478
-
479
- .result_img .result-content {
480
- padding: 10px 0;
481
- }
482
-
483
- .result_img .result-content .img-wrapper img {
484
- width: 300px;
485
- height: 300px;
486
- border-radius: 5px;
487
-
488
- }
489
-
490
- .result_img .result-content h3 {
491
- font-size: 25px;
492
- color: var(--primary);
493
- margin-bottom: 5px;
494
- }
495
-
496
- .result_img .result-content p {
497
- font-size: 17px;
498
- letter-spacing: 2px;
499
- color: var(--primary);
500
- margin-bottom: 5px;
501
-
502
- }
503
-
504
- footer {
505
- font-family: R;
506
- height: 50px;
507
- display: flex;
508
- justify-content: center;
509
- align-items: center;
510
- font-family: "Romanesco";
511
- font-size: 30px;
512
- color: var(--secondary);
513
- background-color: var(--primary);
514
- }
515
-
516
-
517
- @media (max-width:576px) {
518
- html {
519
- font-size: 13px;
520
- }
521
-
522
-
523
-
524
- .raison {
525
- padding: 5px;
526
- }
527
-
528
- .title {
529
- font-size: 25px;
530
- }
531
-
532
-
533
- .upload .upload-content .wrapper .prompt-wrapper button {
534
- padding: 0 5px;
535
- font-size: 10px;
536
- font-weight: 400;
537
- }
538
- }
539
-
540
- @media (max-width:768px) and (min-width:576px) {
541
- html {
542
- font-size: 16px;
543
- }
544
-
545
-
546
- .title {
547
- font-size: 27px;
548
- }
549
-
550
- .raison {
551
- padding: 10px;
552
- }
553
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
static/styles/functions.css ADDED
@@ -0,0 +1,626 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Base Styles */
2
+ @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Romanesco&display=swap");
3
+
4
+ :root {
5
+ /*--primary-color: #4f46e5;
6
+ --primary-dark: #4338ca;
7
+ --secondary-color: #10b981;
8
+ --dark-blue: #0a192f;
9
+ --dark-blue-light: #112240;
10
+ --dark-blue-lighter: #1d3557;
11
+ --text-color: #e6f1ff;
12
+ --text-light: #a8b2d1;
13
+ --text-lightest: #ccd6f6;
14
+ --background-dark: #0a192f;
15
+ --background-card: #112240;
16
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
17
+ --border-radius: 8px;
18
+ --highlight-color: #64ffda;
19
+ /* 0c042c
20
+ d1c10a
21
+
22
+ */
23
+ --primary-color: #4f46e5;
24
+ --primary-dark: #4338ca;
25
+
26
+ --secondary-color: #10b981;
27
+ --dark-blue: #0c042c;
28
+ --dark-blue-light: #1a0d51;
29
+ --dark-blue-lighter: #2b2059;
30
+ --text-color: #e6f1ff;
31
+ --text-light: #a8b2d1;
32
+ --text-lightest: #ccd6f6;
33
+ --background-dark: #0c042c;
34
+ --background-card: #08031e;
35
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
36
+ --border-radius: 8px;
37
+ --highlight-color: #64ffda;
38
+ --code-bg: #0d1b2a;
39
+ }
40
+
41
+ * {
42
+ margin: 0;
43
+ padding: 0;
44
+ box-sizing: border-box;
45
+ }
46
+
47
+ html::-webkit-scrollbar {
48
+ width: 12px;
49
+ }
50
+
51
+ html::-webkit-scrollbar-track {
52
+ background: var(--background-card);
53
+ }
54
+
55
+ html::-webkit-scrollbar-thumb {
56
+ background-color: var(--highlight-color);
57
+ border-radius: var(--border-radius);
58
+ }
59
+
60
+ html::-webkit-scrollbar-thumb:hover {
61
+ background-color: var(--secondary-color);
62
+ }
63
+
64
+
65
+
66
+ body {
67
+ font-family: "Inter", sans-serif;
68
+ color: var(--text-color);
69
+ line-height: 1.6;
70
+ background-color: var(--dark-blue);
71
+
72
+ scrollbar-color: red;
73
+ scrollbar-color: blue;
74
+ }
75
+
76
+ .container {
77
+
78
+ max-width: 1200px;
79
+ margin: 0 auto;
80
+ padding: 0 20px;
81
+ }
82
+
83
+ a {
84
+ text-decoration: none;
85
+ color: inherit;
86
+ }
87
+
88
+ ul {
89
+ list-style: none;
90
+ }
91
+
92
+ img {
93
+ max-width: 100%;
94
+ height: auto;
95
+ border-radius: var(--border-radius);
96
+ }
97
+
98
+
99
+
100
+
101
+
102
+ .btn-primary {
103
+ background-color: var(--primary-color);
104
+ color: white;
105
+ padding: 12px 24px;
106
+ border-radius: var(--border-radius);
107
+ font-weight: 500;
108
+ display: inline-block;
109
+ transition: background-color 0.3s ease;
110
+ border: none;
111
+ cursor: pointer;
112
+ }
113
+
114
+ .btn-primary:hover {
115
+ background-color: var(--primary-dark);
116
+ }
117
+
118
+ .btn-secondary {
119
+ background-color: transparent;
120
+ color: var(--highlight-color);
121
+ padding: 12px 24px;
122
+ border-radius: var(--border-radius);
123
+ font-weight: 500;
124
+ display: inline-block;
125
+ border: 1px solid var(--highlight-color);
126
+ transition: background-color 0.3s ease;
127
+ cursor: pointer;
128
+ }
129
+
130
+ .btn-secondary:hover {
131
+ background-color: rgba(100, 255, 218, 0.1);
132
+ }
133
+
134
+ .section-header {
135
+ text-align: center;
136
+ margin-bottom: 60px;
137
+ }
138
+
139
+ .section-header h2 {
140
+ font-size: 2.5rem;
141
+ margin-bottom: 16px;
142
+ color: var(--text-lightest);
143
+ }
144
+
145
+ .underline {
146
+ height: 4px;
147
+ width: 70px;
148
+ background-color: var(--highlight-color);
149
+ margin: 0 auto;
150
+ }
151
+
152
+ /* Header Styles */
153
+ header {
154
+ background-color: var(--dark-blue);
155
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
156
+ position: sticky;
157
+ top: 0;
158
+ z-index: 100;
159
+ }
160
+
161
+ nav {
162
+ padding: 20px 0;
163
+ }
164
+
165
+ .logo a {
166
+ font-size: 2.5rem;
167
+ font-family: 'Romanesco';
168
+ font-weight: 700;
169
+ color: var(--highlight-color);
170
+ }
171
+
172
+
173
+
174
+ /* Hero Section */
175
+ .hero {
176
+ padding: 80px 0;
177
+
178
+ background-image: linear-gradient(to bottom, var(--dark-blue), var(--dark-blue-light));
179
+ }
180
+
181
+ .hero .container {
182
+ display: flex;
183
+ flex-direction: column;
184
+ align-items: center;
185
+ text-align: center;
186
+ }
187
+
188
+ .hero-content h1 {
189
+ font-size: 3.5rem;
190
+ line-height: 1.2;
191
+ margin-bottom: 24px;
192
+ color: var(--text-lightest);
193
+ }
194
+
195
+ .hero-content p {
196
+ font-size: 1.25rem;
197
+ color: var(--text-light);
198
+ margin-bottom: 32px;
199
+ max-width: 800px;
200
+ }
201
+
202
+
203
+ .reasons {
204
+ padding: 100px 0;
205
+ background-color: var(--dark-blue-light);
206
+ }
207
+
208
+ .reasons-grid {
209
+ display: grid;
210
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
211
+ gap: 30px;
212
+ }
213
+
214
+ .reason-card {
215
+ background-color: var(--background-card);
216
+ padding: 30px;
217
+ border-radius: var(--border-radius);
218
+ box-shadow: var(--shadow);
219
+ border: 1px solid rgba(255, 255, 255, 0.1);
220
+ transition: transform 0.3s ease;
221
+ }
222
+
223
+ .reason-card:hover {
224
+ transform: translateY(-5px);
225
+ border-color: var(--highlight-color);
226
+ }
227
+
228
+ .reason-icon {
229
+ font-size: 2.5rem;
230
+ margin-bottom: 20px;
231
+ color: var(--highlight-color);
232
+ }
233
+
234
+ .reason-card h3 {
235
+ font-size: 1.5rem;
236
+ margin-bottom: 16px;
237
+ color: var(--text-lightest);
238
+ }
239
+
240
+ .reason-card p {
241
+ color: var(--text-light);
242
+ }
243
+
244
+ /* Steps Section */
245
+ .steps {
246
+ padding: 100px 0;
247
+ background-color: var(--dark-blue);
248
+ }
249
+
250
+ .steps-container {
251
+ max-width: 800px;
252
+ margin: 0 auto;
253
+ }
254
+
255
+ .step {
256
+ display: flex;
257
+ margin-bottom: 50px;
258
+ position: relative;
259
+ }
260
+
261
+ .step:last-child {
262
+ margin-bottom: 0;
263
+ }
264
+
265
+ .step-number {
266
+ flex-shrink: 0;
267
+ width: 50px;
268
+ height: 50px;
269
+ border-radius: 50%;
270
+ background-color: var(--primary-color);
271
+ display: flex;
272
+ align-items: center;
273
+ justify-content: center;
274
+ font-size: 1.5rem;
275
+ font-weight: 700;
276
+ margin-right: 30px;
277
+ position: relative;
278
+ z-index: 2;
279
+ }
280
+
281
+ .step-content {
282
+ padding-top: 5px;
283
+ }
284
+
285
+ .step-content h3 {
286
+ font-size: 1.5rem;
287
+ margin-bottom: 16px;
288
+ color: var(--text-lightest);
289
+ }
290
+
291
+ .step-content p {
292
+ color: var(--text-light);
293
+ }
294
+
295
+ .step-line {
296
+ position: absolute;
297
+ top: 50px;
298
+ left: 25px;
299
+ width: 2px;
300
+ height: calc(100% - 0px);
301
+ background-color: var(--primary-color);
302
+ z-index: 1;
303
+ }
304
+
305
+
306
+
307
+
308
+ .upload {
309
+ padding: 100px 0;
310
+ background-color: var(--dark-blue-light);
311
+ }
312
+
313
+ .upload-container {
314
+ max-width: 800px;
315
+ margin: 0 auto;
316
+ }
317
+
318
+ .upload-box {
319
+ background-color: var(--background-card);
320
+ padding: 40px;
321
+ border-radius: var(--border-radius);
322
+ box-shadow: var(--shadow);
323
+ border: 2px dashed rgba(255, 255, 255, 0.2);
324
+ text-align: center;
325
+ transition: border-color 0.3s ease;
326
+ }
327
+
328
+ .upload-box:hover {
329
+ border-color: var(--highlight-color);
330
+ }
331
+
332
+ .upload-icon {
333
+ font-size: 3rem;
334
+ margin-bottom: 20px;
335
+ color: var(--highlight-color);
336
+ }
337
+
338
+ .upload-text {
339
+ margin-bottom: 30px;
340
+ }
341
+
342
+ .upload-text h3 {
343
+ font-size: 1.5rem;
344
+ margin-bottom: 10px;
345
+ color: var(--text-lightest);
346
+ }
347
+
348
+ .upload-text p {
349
+ color: var(--text-light);
350
+ }
351
+
352
+ .file-input-container {
353
+ margin-bottom: 30px;
354
+ }
355
+
356
+ .file-input-label {
357
+ background-color: var(--dark-blue-lighter);
358
+ color: var(--text-lightest);
359
+ padding: 12px 24px;
360
+ border-radius: var(--border-radius);
361
+ cursor: pointer;
362
+ display: inline-block;
363
+ transition: background-color 0.3s ease;
364
+ }
365
+
366
+ .file-input-label:hover {
367
+ background-color: var(--dark-blue);
368
+ }
369
+
370
+ .file-input {
371
+ display: none;
372
+ }
373
+
374
+ .file-name {
375
+ margin-top: 10px;
376
+ color: var(--text-light);
377
+ font-size: 0.9rem;
378
+ }
379
+
380
+ /* Image Preview */
381
+ .image-preview-container {
382
+ margin: 20px 0;
383
+ display: none;
384
+ }
385
+
386
+ .image-preview {
387
+ max-width: 100%;
388
+ max-height: 300px;
389
+ border-radius: var(--border-radius);
390
+ border: 1px solid rgba(255, 255, 255, 0.2);
391
+ }
392
+
393
+ .prompt-container {
394
+ margin-bottom: 30px;
395
+ text-align: left;
396
+ }
397
+
398
+ .prompt-label {
399
+ display: block;
400
+ margin-bottom: 10px;
401
+ color: var(--text-lightest);
402
+ font-weight: 500;
403
+ }
404
+
405
+ .prompt-input {
406
+ width: 100%;
407
+ padding: 12px 16px;
408
+ background-color: var(--dark-blue-lighter);
409
+ border: 1px solid rgba(255, 255, 255, 0.1);
410
+ border-radius: var(--border-radius);
411
+ color: var(--text-color);
412
+ font-family: "Inter", sans-serif;
413
+ font-size: 1rem;
414
+ resize: vertical;
415
+ min-height: 100px;
416
+ transition: border-color 0.3s ease;
417
+ }
418
+
419
+ .prompt-input:focus {
420
+ outline: none;
421
+ border-color: var(--highlight-color);
422
+ }
423
+
424
+ .prompt-input::placeholder {
425
+ color: var(--text-light);
426
+ opacity: 0.7;
427
+ }
428
+
429
+
430
+
431
+ .loading-container {
432
+ display: none;
433
+ margin: 30px 0;
434
+ text-align: center;
435
+ }
436
+
437
+ .loading-spinner {
438
+ display: inline-block;
439
+ width: 50px;
440
+ height: 50px;
441
+ border: 3px solid rgba(100, 255, 218, 0.3);
442
+ border-radius: 50%;
443
+ border-top-color: var(--highlight-color);
444
+ animation: spin 1s ease-in-out infinite;
445
+ }
446
+
447
+ @keyframes spin {
448
+ to {
449
+ transform: rotate(360deg);
450
+ }
451
+ }
452
+
453
+ .loading-text {
454
+ margin-top: 15px;
455
+ color: var(--text-light);
456
+ }
457
+
458
+
459
+ .results {
460
+ padding: 100px 0;
461
+ background-color: var(--dark-blue);
462
+ display: none;
463
+ }
464
+
465
+ .results-container {
466
+ max-width: 800px;
467
+ margin: 0 auto;
468
+ }
469
+
470
+ .results-box {
471
+ background-color: var(--background-card);
472
+ padding: 40px;
473
+ border-radius: var(--border-radius);
474
+ box-shadow: var(--shadow);
475
+ border: 1px solid rgba(255, 255, 255, 0.1);
476
+ }
477
+
478
+ .results-header {
479
+ display: flex;
480
+
481
+ align-items: center;
482
+ margin-bottom: 30px;
483
+ padding-bottom: 20px;
484
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
485
+ }
486
+
487
+ .results-title h3 {
488
+ font-size: 1.5rem;
489
+ color: var(--text-lightest);
490
+ }
491
+
492
+ .results-content {
493
+ margin-bottom: 30px;
494
+ color: var(--text-light);
495
+ line-height: 1.8;
496
+ }
497
+
498
+ .results-image-container {
499
+ margin-bottom: 30px;
500
+ text-align: center;
501
+ }
502
+
503
+ .results-image {
504
+ max-width: 100%;
505
+ max-height: 300px;
506
+ border-radius: var(--border-radius);
507
+ border: 1px solid rgba(255, 255, 255, 0.2);
508
+ }
509
+
510
+ .results-chart-container {
511
+ margin-bottom: 30px;
512
+ text-align: center;
513
+ background-color: white;
514
+ padding: 20px;
515
+ border-radius: var(--border-radius);
516
+ }
517
+
518
+ .results-chart {
519
+ max-width: 100%;
520
+ max-height: 400px;
521
+ border-radius: var(--border-radius);
522
+ }
523
+
524
+ .results-code-container {
525
+ margin-bottom: 30px;
526
+ }
527
+
528
+ .results-code-header {
529
+ display: flex;
530
+ justify-content: space-between;
531
+ align-items: center;
532
+ margin-bottom: 15px;
533
+ }
534
+
535
+ .results-code-title {
536
+ font-size: 1.2rem;
537
+ color: var(--text-lightest);
538
+ }
539
+
540
+ .results-code {
541
+ background-color: var(--code-bg);
542
+ padding: 20px;
543
+ border-radius: var(--border-radius);
544
+ overflow-x: auto;
545
+ font-family: monospace;
546
+ font-size: 0.9rem;
547
+ line-height: 1.5;
548
+ color: var(--text-light);
549
+ border: 1px solid rgba(255, 255, 255, 0.1);
550
+ }
551
+
552
+ .results-code pre {
553
+ margin: 0;
554
+ white-space: pre-wrap;
555
+ }
556
+
557
+ .results-actions {
558
+ display: flex;
559
+ justify-content: flex-end;
560
+ gap: 15px;
561
+ }
562
+
563
+
564
+ footer {
565
+ background-color: var(--dark-blue-lighter);
566
+ color: var(--text-color);
567
+ padding: 80px 0 30px;
568
+ }
569
+
570
+ .footer-content {
571
+
572
+ margin-bottom: 60px;
573
+ }
574
+
575
+ .footer-logo a {
576
+ font-size: 2rem;
577
+ font-family: 'Romanesco';
578
+ margin-bottom: 8px;
579
+ color: var(--highlight-color);
580
+ }
581
+
582
+ .footer-logo p {
583
+ color: var(--text-light);
584
+ }
585
+
586
+ .footer-bottom {
587
+ text-align: center;
588
+ padding-top: 30px;
589
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
590
+ color: var(--text-light);
591
+ }
592
+
593
+
594
+ @media (max-width: 768px) {
595
+
596
+ .section-header h2 {
597
+ font-size: 2rem;
598
+ }
599
+
600
+ .hero-content h1 {
601
+ font-size: 2.5rem;
602
+ }
603
+
604
+ .step {
605
+ flex-direction: column;
606
+ }
607
+
608
+ .step-number {
609
+ margin-bottom: 20px;
610
+ margin-right: 0;
611
+ }
612
+
613
+ .step-line {
614
+ display: none;
615
+ }
616
+
617
+ .footer-content {
618
+ flex-direction: column;
619
+ gap: 40px;
620
+ }
621
+
622
+ .footer-links {
623
+ flex-wrap: wrap;
624
+ gap: 30px;
625
+ }
626
+ }
static/styles/index.css CHANGED
@@ -1,288 +1,375 @@
 
1
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Romanesco&display=swap");
2
 
3
- *,
4
- *::after,
5
- *::before {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  margin: 0;
7
  padding: 0;
8
  box-sizing: border-box;
9
  }
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  a {
12
  text-decoration: none;
 
13
  }
14
 
15
- :root {
16
- --primary: #0c042c;
17
- --secondary: #d1c10a;
18
- --helper: #c9c5e0;
19
  }
20
 
21
- html {
22
- scroll-behavior: smooth;
23
- font-size: 20px;
 
24
  }
25
 
26
- body {
27
- font-family: "Roboto";
 
 
 
 
 
 
 
28
 
 
 
29
  }
30
 
31
- header {
32
- background-color: #0c042c;
33
- padding: 10px 0;
 
 
 
 
 
 
34
  }
35
 
36
- header div {
37
- width: 80%;
38
- margin: 0 auto;
39
  }
40
 
41
- header div a {
42
- font-family: "Romanesco";
 
 
 
 
43
  font-size: 2.5rem;
44
- color: var(--secondary);
45
- cursor: pointer;
46
  }
47
 
48
- .hero {
49
- height: calc(100vh - 70px);
50
- position: relative;
51
- background-color: var(--primary);
52
- display: flex;
53
- justify-content: center;
54
- align-items: center;
55
- overflow: hidden;
56
  }
57
 
58
- .hero img {
59
- position: absolute;
60
- left: -200px;
61
- right: 0;
62
- top: 42%;
 
 
63
  }
64
 
65
- .hero .hero-content {
66
- padding: 10px 20px;
67
- color: var(--secondary);
68
- text-align: center;
69
- transform: translateY(-50px);
70
  }
71
 
72
- .hero .hero-content h3 {
73
- font-size: 0.85rem;
74
- font-weight: 200;
75
- letter-spacing: 3px;
76
- margin-bottom: 20px;
77
  }
78
 
79
- .hero .hero-content h1 {
80
- font-family: "Roboto";
81
- font-size: 2rem;
82
- font-weight: bolder;
 
 
 
 
83
  }
84
 
85
- .hero .hero-content .buttons {
86
- font-size: 18px;
87
- font-weight: bolder;
88
- text-transform: capitalize;
89
  display: flex;
90
- justify-content: center;
91
  align-items: center;
92
- gap: 70px;
93
- margin-top: 50px;
94
  }
95
 
96
- .hero .hero-content .buttons a {
97
- padding: 10px 20px;
98
- border-radius: 4px;
99
- transition: all 0.4s;
100
  }
101
 
102
- .hero .hero-content .buttons a:hover {
103
- transform: scale(1.05);
 
 
 
104
  }
105
 
106
- .hero .hero-content .buttons a:first-child {
107
- background-color: var(--secondary);
108
- color: var(--primary);
 
 
109
  }
110
 
111
- .hero .hero-content .buttons a:last-child {
112
- background-color: var(--helper);
113
- color: var(--secondary);
114
  }
115
 
116
- .about {
117
- position: relative;
118
- padding: 50px 0 30px;
119
- background-color: var(--helper);
120
- overflow: hidden;
121
  }
122
 
123
- .about img {
124
- position: absolute;
 
125
  }
126
 
127
- .about img:first-child {
128
- top: 10px;
129
- left: -50px;
 
 
 
 
 
 
 
130
  }
131
 
132
- .about img:nth-child(2) {
133
- bottom: 10px;
134
- right: 0;
135
  }
136
 
137
- .about .about-content {
138
- width: 100%;
139
- max-width: 80%;
140
- margin: 0 auto;
141
  }
142
 
143
- .title {
144
- font-size: 30px;
145
- text-align: center;
146
- text-shadow: 2px 4px 0 rgba(72, 71, 71, 0.529);
147
- color: var(--primary);
148
  }
149
 
150
- .about .about-content h1 {
151
- margin: 50px 0;
152
  }
153
 
154
- .about .about-content p {
155
- letter-spacing: 3px;
156
- text-transform: capitalize;
157
- margin-bottom: 70px;
158
- font-weight: 500;
159
- font-size: 1rem;
160
  }
161
 
162
- .features {
163
- position: relative;
164
- overflow: hidden;
165
- margin-bottom: 50px;
166
  }
167
 
168
- .features img {
169
- position: absolute;
170
- width: 125%;
171
- top: 58%;
172
- left: -275px;
173
  }
174
 
175
- .features-content h1 {
176
- margin: 50px 0;
 
 
 
177
  }
178
 
179
- .features-content .features-wrapper {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  display: flex;
181
  justify-content: center;
182
- align-items: center;
183
- flex-wrap: wrap;
184
- gap: 30px;
185
  }
186
 
187
- .feature {
188
- display: flex;
189
- flex-direction: column;
190
- background-color: var(--primary);
191
- color: var(--secondary);
192
  text-align: center;
193
- width: 100%;
194
- max-width: 300px;
195
- padding: 20px 10px 0;
196
- border-radius: 8px;
197
- height: 300px;
198
- z-index: 2;
199
- box-shadow: 0 0 10px black;
200
- transition: all 0.6s;
201
  }
202
 
203
- .feature:hover {
204
- transform: scale(1.1);
 
 
205
  }
206
 
207
- .feature i {
208
- font-size: 50px;
209
- margin-bottom: 20px;
 
 
 
210
  }
211
 
212
- .feature h2 {
213
- font-size: 25px;
214
- flex: 1;
215
- display: flex;
216
- justify-content: center;
217
- align-items: center;
218
  }
219
 
220
- .feature p {
221
- font-size: 15px;
222
- font-weight: 100;
223
- margin-top: 20px;
224
- width: 100%;
225
- margin-bottom: 20px;
226
  }
227
 
228
- .btn-wrapper {
229
- width: 100%;
230
 
231
- padding-bottom: 30px;
232
- display: flex;
233
- align-items: flex-end;
234
- justify-content: center;
235
  }
236
 
237
- .btn {
238
- font-size: 18px;
239
- font-weight: bolder;
240
- text-transform: capitalize;
241
- padding: 10px 20px;
242
- border-radius: 4px;
243
- transition: all 0.4s;
244
- background-color: var(--helper);
245
- color: var(--primary);
246
  }
247
 
248
- .btn:hover {
249
- transform: scale(1.05);
250
  }
251
 
252
- footer {
253
- font-family: R;
254
- height: 50px;
255
- display: flex;
256
- justify-content: center;
257
- align-items: center;
258
- font-family: "Romanesco";
259
- font-size: 30px;
260
- color: var(--secondary);
261
- background-color: var(--primary);
262
  }
263
 
264
- @media (max-width:576px) {
265
- html {
266
- font-size: 13px;
 
 
 
 
267
  }
268
 
 
 
 
269
 
 
 
 
270
 
271
- .hero .hero-content .buttons a {
272
- padding: 5px 10px;
273
  }
274
 
 
 
 
 
275
 
 
 
 
 
276
  }
277
 
278
- @media (max-width:768px) and (min-width:576px) {
279
- html {
280
- font-size: 16px;
281
  }
282
 
 
 
 
283
 
284
- .hero .hero-content .buttons a {
285
- padding: 5px 10px;
286
  }
287
 
 
 
 
288
  }
 
1
+ /* Base Styles */
2
  @import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Roboto:ital,wght@0,100..900;1,100..900&family=Romanesco&display=swap");
3
 
4
+ :root {
5
+ --primary-color: #4f46e5;
6
+ --primary-dark: #4338ca;
7
+ --dark-blue: #0c042c;
8
+ --dark-blue-light: #1a0d51;
9
+ --dark-blue-lighter: #2b2059;
10
+ --secondary-color: #10b981;
11
+ --highlight-color: #64ffda;
12
+ --text-color: #e6f1ff;
13
+ --text-light: #a8b2d1;
14
+ --text-lightest: #ccd6f6;
15
+ --background-dark: #0c042c;
16
+ --background-card: #08031e;
17
+ --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
18
+ --border-radius: 8px;
19
+ }
20
+
21
+ * {
22
  margin: 0;
23
  padding: 0;
24
  box-sizing: border-box;
25
  }
26
 
27
+ html {
28
+ scroll-behavior: smooth;
29
+ }
30
+
31
+ html::-webkit-scrollbar {
32
+ width: 12px;
33
+ }
34
+
35
+ html::-webkit-scrollbar-track {
36
+ background: var(--background-card);
37
+ }
38
+
39
+ html::-webkit-scrollbar-thumb {
40
+ background-color: var(--highlight-color);
41
+ border-radius: var(--border-radius);
42
+ }
43
+
44
+ html::-webkit-scrollbar-thumb:hover {
45
+ background-color: var(--secondary-color);
46
+ }
47
+
48
+ body {
49
+ font-family: "Inter", sans-serif;
50
+ color: var(--text-color);
51
+ line-height: 1.6;
52
+ overflow-x: hidden;
53
+ }
54
+
55
+ .container {
56
+ max-width: 1200px;
57
+ margin: 0 auto;
58
+ padding: 0 20px;
59
+ }
60
+
61
  a {
62
  text-decoration: none;
63
+ color: inherit;
64
  }
65
 
66
+ ul {
67
+ list-style: none;
 
 
68
  }
69
 
70
+ img {
71
+ max-width: 100%;
72
+ height: auto;
73
+ border-radius: var(--border-radius);
74
  }
75
 
76
+ .btn-primary {
77
+ background-color: var(--primary-color);
78
+ color: white;
79
+ padding: 12px 24px;
80
+ border-radius: var(--border-radius);
81
+ font-weight: 500;
82
+ display: inline-block;
83
+ transition: background-color 0.3s ease;
84
+ }
85
 
86
+ .btn-primary:hover {
87
+ background-color: var(--primary-dark);
88
  }
89
 
90
+ .btn-secondary {
91
+ background-color: transparent;
92
+ color: var(--primary-color);
93
+ padding: 12px 24px;
94
+ border-radius: var(--border-radius);
95
+ font-weight: 500;
96
+ display: inline-block;
97
+ border: 1px solid var(--primary-color);
98
+ transition: background-color 0.3s ease;
99
  }
100
 
101
+ .btn-secondary:hover {
102
+ background-color: rgba(79, 70, 229, 0.1);
 
103
  }
104
 
105
+ .section-header {
106
+ text-align: center;
107
+ margin-bottom: 60px;
108
+ }
109
+
110
+ .section-header h2 {
111
  font-size: 2.5rem;
112
+ margin-bottom: 16px;
113
+ color: var(--text-color);
114
  }
115
 
116
+ .underline {
117
+ height: 4px;
118
+ width: 70px;
119
+ background-color: var(--highlight-color);
120
+ margin: 0 auto;
 
 
 
121
  }
122
 
123
+
124
+ header {
125
+ background-color: var(--dark-blue);
126
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
127
+ position: sticky;
128
+ top: 0;
129
+ z-index: 100;
130
  }
131
 
132
+ nav {
133
+
134
+ padding: 20px 0;
 
 
135
  }
136
 
137
+ .logo a {
138
+ font-size: 2.5rem;
139
+ font-family: 'Romanesco';
140
+ font-weight: 700;
141
+ color: var(--highlight-color);
142
  }
143
 
144
+
145
+
146
+
147
+
148
+ .hero {
149
+ padding: 100px 0;
150
+
151
+ background-image: linear-gradient(to bottom, var(--dark-blue), var(--dark-blue-light));
152
  }
153
 
154
+ .hero .container {
 
 
 
155
  display: flex;
 
156
  align-items: center;
157
+ gap: 60px;
 
158
  }
159
 
160
+ .hero-content {
161
+ flex: 1;
 
 
162
  }
163
 
164
+ .hero-content h1 {
165
+ font-size: 3.5rem;
166
+ line-height: 1.2;
167
+ margin-bottom: 24px;
168
+ color: var(--text-color);
169
  }
170
 
171
+ .hero-content p {
172
+ font-size: 1.25rem;
173
+ color: var(--text-light);
174
+ margin-bottom: 32px;
175
+ max-width: 90%;
176
  }
177
 
178
+ .hero-buttons {
179
+ display: flex;
180
+ gap: 16px;
181
  }
182
 
183
+ .hero-image {
184
+ flex: 1;
185
+ display: flex;
186
+ justify-content: flex-end;
 
187
  }
188
 
189
+ .animate {
190
+ animation: show linear;
191
+ animation-timeline: view(90% auto);
192
  }
193
 
194
+ @keyframes show {
195
+ from {
196
+ opacity: 0;
197
+ transform: translate(120px) scale(0.1);
198
+ }
199
+
200
+ to {
201
+ opacity: 1;
202
+ transform: translate(0) scale(1);
203
+ }
204
  }
205
 
206
+ .about {
207
+ padding: 100px 0;
208
+ background-color: var(--dark-blue-light);
209
  }
210
 
211
+ .about-content {
212
+ display: flex;
213
+ align-items: center;
214
+ gap: 60px;
215
  }
216
 
217
+ .about-image {
218
+ flex: 1;
 
 
 
219
  }
220
 
221
+ .about-text {
222
+ flex: 1;
223
  }
224
 
225
+ .about-text h3 {
226
+ font-size: 2rem;
227
+ margin-bottom: 24px;
228
+ color: var(--text-color);
 
 
229
  }
230
 
231
+ .about-text p {
232
+ margin-bottom: 16px;
233
+ color: var(--text-light);
 
234
  }
235
 
236
+
237
+ .functions {
238
+ padding: 100px 0;
239
+ background-color: var(--dark-blue);
 
240
  }
241
 
242
+ .functions-grid {
243
+ display: grid;
244
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
245
+
246
+ gap: 30px;
247
  }
248
 
249
+ .function-card {
250
+ background-color: var(--background-card);
251
+ padding: 40px 30px;
252
+ border-radius: var(--border-radius);
253
+ border: 1px solid var(--background-card);
254
+ box-shadow: var(--shadow);
255
+ transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
256
+ }
257
+
258
+ .function-card:hover {
259
+ transform: translateY(-5px);
260
+ border-color: var(--highlight-color);
261
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
262
+ }
263
+
264
+ .function-icon {
265
+ margin-bottom: 24px;
266
  display: flex;
267
  justify-content: center;
 
 
 
268
  }
269
 
270
+ .function-card h3 {
271
+ font-size: 1.5rem;
272
+ margin-bottom: 16px;
273
+ color: var(--text-color);
 
274
  text-align: center;
 
 
 
 
 
 
 
 
275
  }
276
 
277
+ .function-card p {
278
+ color: var(--text-light);
279
+ margin-bottom: 24px;
280
+ text-align: center;
281
  }
282
 
283
+ .function-link {
284
+ display: block;
285
+ text-align: center;
286
+ color: var(--primary-color);
287
+ font-weight: 500;
288
+ transition: color 0.3s ease;
289
  }
290
 
291
+ .function-link:hover {
292
+ color: var(--primary-dark);
 
 
 
 
293
  }
294
 
295
+
296
+ footer {
297
+ background-color: var(--dark-blue-lighter);
298
+ color: white;
299
+ padding: 80px 0 30px;
 
300
  }
301
 
302
+ .footer-content {
 
303
 
304
+ margin-bottom: 60px;
 
 
 
305
  }
306
 
307
+ .footer-logo a {
308
+ font-size: 2rem;
309
+ font-family: 'Romanesco';
310
+ color: var(--highlight-color);
311
+ margin-bottom: 8px;
312
+
 
 
 
313
  }
314
 
315
+ .footer-logo p {
316
+ color: var(--text-light);
317
  }
318
 
319
+
320
+ .footer-bottom {
321
+ text-align: center;
322
+ padding-top: 30px;
323
+ border-top: 1px solid #374151;
324
+ color: var(--text-light);
 
 
 
 
325
  }
326
 
327
+ @media (max-width: 992px) {
328
+ .hero .container {
329
+ flex-direction: column;
330
+ }
331
+
332
+ .hero-content {
333
+ text-align: center;
334
  }
335
 
336
+ .hero-content p {
337
+ max-width: 100%;
338
+ }
339
 
340
+ .hero-buttons {
341
+ justify-content: center;
342
+ }
343
 
344
+ .about-content {
345
+ flex-direction: column;
346
  }
347
 
348
+ .footer-content {
349
+ flex-direction: column;
350
+ gap: 40px;
351
+ }
352
 
353
+ .footer-links {
354
+ flex-wrap: wrap;
355
+ gap: 30px;
356
+ }
357
  }
358
 
359
+ @media (max-width: 768px) {
360
+ .nav-links {
361
+ display: none;
362
  }
363
 
364
+ .section-header h2 {
365
+ font-size: 2rem;
366
+ }
367
 
368
+ .hero-content h1 {
369
+ font-size: 2.5rem;
370
  }
371
 
372
+ .about-text h3 {
373
+ font-size: 1.75rem;
374
+ }
375
  }
static/styles/notification.css CHANGED
@@ -1,87 +1,165 @@
1
- .notifications {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  position: fixed;
3
- top: 15px;
4
- right: 15px;
5
- height: 100vh;
6
- z-index: 12;
 
7
  display: flex;
8
- flex-direction: column;
9
- gap: 20px;
10
- font-family: Roboto, sans-serif;
11
  }
12
 
13
  .notification {
14
  position: relative;
15
- width: 300px;
16
  display: flex;
17
  align-items: center;
18
- gap: 20px;
19
- border-radius: 10px;
20
- animation: spin 0.5s linear 1 alternate;
21
- padding: 10px 20px;
22
- background-color: #e7e7e7;
23
- color: #000;
24
- box-shadow: 0 0 12px black;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
 
 
26
  }
27
 
28
- .notification .icon {
29
- font-size: 30px;
 
 
 
 
 
 
 
 
 
 
30
  }
31
 
32
- .error .icon {
33
- color: red
 
 
 
34
  }
35
 
36
- .warning .icon {
37
- color: rgb(255, 225, 0)
 
38
  }
39
 
40
- i.close {
41
  position: absolute;
42
- color: black;
43
- top: 10px;
44
- right: 10px;
45
- font-size: 15px;
 
46
  cursor: pointer;
47
- opacity: 0.6;
 
 
 
 
 
 
 
 
48
  }
49
 
50
- i.close:hover {
51
  opacity: 1;
52
  }
53
 
54
- .notification .notification-content {
55
- flex: 1;
56
- display: flex;
57
- flex-direction: column;
58
- flex-wrap: wrap;
59
- gap: 5px;
60
- overflow: hidden;
61
  }
62
 
63
- .notification .notification-content h3 {
64
- text-transform: capitalize;
65
- font-size: 22px;
 
 
 
 
 
66
  }
67
 
68
- .notification .notification-content p {
69
- font-size: 15px;
70
- text-overflow: ellipsis;
71
- color: #333;
72
 
73
- flex: 1;
 
 
74
  }
75
 
 
 
 
 
76
 
77
- @keyframes spin {
78
- from {
79
- transform: translateX(300px);
80
- opacity: 0;
81
- }
82
 
83
- to {
84
- transform: translateX(0);
85
- opacity: 1;
 
 
 
 
 
 
 
 
 
86
  }
87
  }
 
1
+ :root {
2
+ --error-color: #ef4444;
3
+ --error-bg: rgba(239, 68, 68, 0.1);
4
+ --error-border: rgba(239, 68, 68, 0.3);
5
+
6
+ --warning-color: #f59e0b;
7
+ --warning-bg: rgba(245, 158, 11, 0.1);
8
+ --warning-border: rgba(245, 158, 11, 0.3);
9
+
10
+ --success-color: #10b981;
11
+ --success-bg: rgba(16, 185, 129, 0.1);
12
+ --success-border: rgba(16, 185, 129, 0.3);
13
+
14
+ --info-color: #3b82f6;
15
+ --info-bg: rgba(59, 130, 246, 0.1);
16
+ --info-border: rgba(59, 130, 246, 0.3);
17
+ }
18
+
19
+ .notification-container {
20
  position: fixed;
21
+ top: 20px;
22
+ right: 20px;
23
+ width: 100%;
24
+ max-width: 400px;
25
+ z-index: 1000;
26
  display: flex;
27
+ flex-direction: column-reverse;
28
+ gap: 10px;
29
+ overflow: hidden;
30
  }
31
 
32
  .notification {
33
  position: relative;
34
+
35
  display: flex;
36
  align-items: center;
37
+ padding: 16px;
38
+ border-radius: var(--border-radius);
39
+ box-shadow: var(--shadow);
40
+ animation: slideIn 0.3s ease forwards;
41
+ transform: translateX(120%);
42
+ opacity: 0;
43
+ }
44
+
45
+ @keyframes slideIn {
46
+ to {
47
+ transform: translateX(0);
48
+ opacity: 1;
49
+ }
50
+ }
51
+
52
+ @keyframes slideOut {
53
+ from {
54
+ transform: translateX(0);
55
+ opacity: 1;
56
+ }
57
+
58
+ to {
59
+ transform: translateX(120%);
60
+ opacity: 0;
61
+ }
62
+ }
63
 
64
+ .notification.hide {
65
+ animation: slideOut 0.3s ease forwards;
66
  }
67
 
68
+ .notification-icon {
69
+ flex-shrink: 0;
70
+ width: 24px;
71
+ height: 24px;
72
+ margin-right: 12px;
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ }
77
+
78
+ .notification-content {
79
+ flex-grow: 1;
80
  }
81
 
82
+ .notification-title {
83
+ font-weight: 600;
84
+ margin-bottom: 4px;
85
+ font-size: 1rem;
86
+ text-transform: capitalize;
87
  }
88
 
89
+ .notification-message {
90
+ font-size: 0.875rem;
91
+ margin: 0;
92
  }
93
 
94
+ .notification-close {
95
  position: absolute;
96
+
97
+ width: 20px;
98
+ height: 20px;
99
+ top: 0;
100
+ right: 0;
101
  cursor: pointer;
102
+ opacity: 0.7;
103
+ transition: opacity 0.2s ease;
104
+ background: none;
105
+ border: none;
106
+ padding: 0;
107
+ display: flex;
108
+ align-items: center;
109
+ justify-content: center;
110
+ color: white;
111
  }
112
 
113
+ .notification-close:hover {
114
  opacity: 1;
115
  }
116
 
117
+ .notification-error {
118
+ background-color: var(--error-bg);
119
+ border-left: 4px solid var(--error-color);
 
 
 
 
120
  }
121
 
122
+ .notification-error .notification-icon,
123
+ .notification-error .notification-title {
124
+ color: var(--error-color);
125
+ }
126
+
127
+ .notification-warning {
128
+ background-color: var(--warning-bg);
129
+ border-left: 4px solid var(--warning-color);
130
  }
131
 
132
+ .notification-warning .notification-icon,
133
+ .notification-warning .notification-title {
134
+ color: var(--warning-color);
135
+ }
136
 
137
+ .notification-success {
138
+ background-color: var(--success-bg);
139
+ border-left: 4px solid var(--success-color);
140
  }
141
 
142
+ .notification-success .notification-icon,
143
+ .notification-success .notification-title {
144
+ color: var(--success-color);
145
+ }
146
 
147
+ .notification-info {
148
+ background-color: var(--info-bg);
149
+ border-left: 4px solid var(--info-color);
150
+ }
 
151
 
152
+ .notification-info .notification-icon,
153
+ .notification-info .notification-title {
154
+ color: var(--info-color);
155
+ }
156
+
157
+ /* Responsive Styles */
158
+ @media (max-width: 768px) {
159
+ .notification-container {
160
+ top: 10px;
161
+ right: 10px;
162
+ left: 10px;
163
+ width: auto;
164
  }
165
  }
templates/DataVisualisation.html DELETED
@@ -1,116 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>SmartDoc AI-Data Visualisation</title>
8
- <link rel="stylesheet" href="static/styles/features.css" />
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
10
- <link rel="stylesheet" href="static/styles/notification.css" />
11
- </head>
12
-
13
- <body>
14
- <header>
15
- <div class="container">
16
- <a href="/">SmartDoc AI </a>
17
- </div>
18
- </header>
19
- <main>
20
- <main>
21
- <section id="hero" class="hero">
22
- <img src="static/assests/g.svg" alt="" />
23
- <div class="container hero-content">
24
- <h1>Turn Data into <br />Stunning Visuals</h1>
25
- <h3>Create interactive charts and graphs efforlessly</h3>
26
- <p>
27
- Our Data visualisation tool helps you to transform raw data into visually appealing charts and
28
- graphs , enabling
29
-
30
- better decision - making and communication of insights </p>
31
- </div>
32
- </section>
33
- <section class="raisons">
34
- <div class="container raisons-content">
35
- <h1 class="title">Why Choose Our Data Visualisation Tool ?</h1>
36
- <div class="raisons-wrapper">
37
- <div class="raison">
38
- <i class="fas fa-check-circle"></i>
39
- <p>User-friendly interface for all skill lavels </p>
40
- </div>
41
- <div class="raison">
42
- <i class="fas fa-check-circle"></i>
43
- <p>Multiple chart types suit your needs</p>
44
- </div>
45
- <div class="raison">
46
- <i class="fas fa-check-circle"></i>
47
- <p>Interactive and customizable Visuals</p>
48
- </div>
49
- <div class="raison">
50
- <i class="fas fa-check-circle"></i>
51
- <p>Secure and private processing</p>
52
- </div>
53
- </div>
54
- </div>
55
- </section>
56
- <section class="steps">
57
- <img src="static/assests/g.svg" alt="" />
58
- <div class="steps-content">
59
- <h1 class="title">How it works</h1>
60
- <div class="steps-wrapper">
61
- <div class="step">
62
- <span>1</span>
63
- <p>Upload your Data</p>
64
- </div>
65
- <div class="step">
66
- <span>2</span>
67
- <p>Prompt your need </p>
68
- </div>
69
- <div class="step">
70
- <span>3</span>
71
- <p>
72
- View Result and
73
- download your chart
74
- </p>
75
- </div>
76
- </div>
77
- </div>
78
- </section>
79
-
80
- <section class="upload">
81
- <div class="container upload-content">
82
- <h1 class="title">Upload</h1>
83
- <p>Supported Formats: Excel</p>
84
- <form class="wrapper" enctype="multipart/form-data">
85
- <div class="input-wrapper">
86
- <label for="document-input" id="label-input" class="active" draggable="true">
87
- <input type="file" id="document-input" hidden />
88
- <i class="fa fa-cloud-arrow-up"></i>
89
- <span>Drag and Drop or Select a File</span>
90
- </label>
91
- </div>
92
- <div class="file-container"></div>
93
- <div class="prompt-wrapper">
94
- <input type="text" id="text-prompt" placeholder="decribe your need ...">
95
- <button type="submit">Genreate</button>
96
- </div>
97
- </form>
98
- </div>
99
- </section>
100
- <section class="result" id="result">
101
- <div class="container result-content">
102
- <h1 class="title">Result</h1>
103
- <div class="chart-wrapper">
104
- </div>
105
- </div>
106
- </section>
107
- </main>
108
- <footer>SmartDoc AI - 2025</footer>
109
- <div class="notifications">
110
- </div>
111
- <script src="static/scripts/dataViz.js"></script>
112
-
113
- </body>
114
-
115
-
116
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/ImageInterpretation.html DELETED
@@ -1,114 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>SmartDoc AI-Image Interpretation</title>
8
- <link rel="stylesheet" href="static/styles/features.css" />
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
10
- <link rel="stylesheet" href="static/styles/notification.css" />
11
- </head>
12
-
13
- <body>
14
- <div class="notifications">
15
- </div>
16
- <header>
17
- <div class="container">
18
- <a href="/">SmartDoc AI </a>
19
- </div>
20
- </header>
21
- <main>
22
- <section id="hero" class="hero">
23
- <img src="static/assests/g.svg" alt="" />
24
- <div class="container hero-content">
25
- <h1>Unlock the Meaning Behind <br />Your Images in Seconds</h1>
26
- <h3>AI - powered analysis for visual content</h3>
27
- <p>
28
- Whether you’re working with photos , diagrams , or illustrations ,
29
- our image interpretation tool provides detailed descriptions and
30
- insights , making visual data more accessible than ever.
31
- </p>
32
- </div>
33
- </section>
34
- <section class="raisons">
35
- <div class="container raisons-content">
36
- <h1 class="title">Why Choose Our Image Interpretation Tool ?</h1>
37
- <div class="raisons-wrapper">
38
- <div class="raison">
39
- <i class="fas fa-check-circle"></i>
40
- <p>Accurate and detailed descriptions</p>
41
- </div>
42
- <div class="raison">
43
- <i class="fas fa-check-circle"></i>
44
- <p>Dentifies objects,scenes , and text within images</p>
45
- </div>
46
- <div class="raison">
47
- <i class="fas fa-check-circle"></i>
48
- <p>Ideal for accessibility and content creation</p>
49
- </div>
50
- <div class="raison">
51
- <i class="fas fa-check-circle"></i>
52
- <p>Secure and private processing</p>
53
- </div>
54
- </div>
55
- </div>
56
- </section>
57
- <section class="steps">
58
- <img src="static/assests/g.svg" alt="" />
59
- <div class="steps-content">
60
- <h1 class="title">How it works</h1>
61
- <div class="steps-wrapper">
62
- <div class="step">
63
- <span>1</span>
64
- <p>Upload your Image</p>
65
- </div>
66
- <div class="step">
67
- <span>2</span>
68
- <p>Let our AI analyze the content</p>
69
- </div>
70
- <div class="step">
71
- <span>3</span>
72
- <p>View Detailed description or tags</p>
73
- </div>
74
- </div>
75
- </div>
76
- </section>
77
- <section class="upload">
78
- <div class="container upload-content">
79
- <h1 class="title">Upload</h1>
80
- <p>Supported Formats: PNG,JPG,JPEG</p>
81
- <form class="wrapper" enctype="multipart/form-data">
82
- <div class="input-wrapper">
83
- <label for="document-input" id="label-input" class="active" draggable="true">
84
- <input type="file" id="document-input" hidden />
85
- <i class="fa fa-cloud-arrow-up"></i>
86
- <span>Drag and Drop or Select a File</span>
87
- </label>
88
- </div>
89
- <div class="file-container"></div>
90
- <div class="btn-wrapper">
91
- <button type="submit" id="interpret">Interpret</button>
92
- </div>
93
- </form>
94
- </div>
95
- </section>
96
- <section id="result_img" class="result_img">
97
- <div class="container result-content">
98
- <h1 class="title">Result</h1>
99
- <div class="img-wrapper">
100
-
101
- </div>
102
-
103
- <h3>Description : </h3>
104
- <p class="result-text">
105
- </p>
106
-
107
- </div>
108
- </section>
109
- </main>
110
- <footer>SmartDoc AI - 2025</footer>
111
- <script src="static/scripts/image_iterpretation.js"></script>
112
- </body>
113
-
114
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/Summarization.html DELETED
@@ -1,114 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>SmartDoc AI-Summarization</title>
8
- <link rel="stylesheet" href="static/styles/features.css" />
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
10
- <link rel="stylesheet" href="static/styles/notification.css" />
11
- </head>
12
-
13
- <body>
14
-
15
- <header>
16
- <div class="container">
17
- <a href="/">SmartDoc AI </a>
18
- </div>
19
- </header>
20
- <main>
21
- <section id="hero" class="hero">
22
- <img src="static/assests/g.svg" alt="" />
23
- <div class="container hero-content">
24
- <h1>Summarize Your Documents <br />in Seconds</h1>
25
- <h3>Effortlessly extract key insights from Documents</h3>
26
- <p>
27
- Our AI-powered summarization tool processes lengthy generates
28
- concise summaries , saving your time and effort . Perfect for
29
- students , researchers , and professionals.
30
- </p>
31
- </div>
32
- </section>
33
- <section class="raisons">
34
- <div class="container raisons-content">
35
- <h1 class="title">Why Choose Our Summarization Tool ?</h1>
36
- <div class="raisons-wrapper">
37
- <div class="raison">
38
- <i class="fas fa-check-circle"></i>
39
- <p>Fast and accurate summarization</p>
40
- </div>
41
- <div class="raison">
42
- <i class="fas fa-check-circle"></i>
43
- <p>Retains key information and context</p>
44
- </div>
45
- <div class="raison">
46
- <i class="fas fa-check-circle"></i>
47
- <p>Supports multiple file formats</p>
48
- </div>
49
- <div class="raison">
50
- <i class="fas fa-check-circle"></i>
51
- <p>Secure and private processing</p>
52
- </div>
53
- </div>
54
- </div>
55
- </section>
56
- <section class="steps">
57
- <img src="static/assests/g.svg" alt="" />
58
- <div class="steps-content">
59
- <h1 class="title">How it works</h1>
60
- <div class="steps-wrapper">
61
- <div class="step">
62
- <span>1</span>
63
- <p>Upload your document</p>
64
- </div>
65
- <div class="step">
66
- <span>2</span>
67
- <p>Let our AI analyze the content</p>
68
- </div>
69
- <div class="step">
70
- <span>3</span>
71
- <p>Downlaod or copy the summarized text</p>
72
- </div>
73
- </div>
74
- </div>
75
- </section>
76
-
77
- <section class="upload">
78
- <div class="container upload-content">
79
- <h1 class="title">Upload</h1>
80
- <p>Supported Formats: DOCX ,PDF, PPTX,XLSX</p>
81
- <form class="wrapper" enctype="multipart/form-data">
82
- <div class="input-wrapper">
83
- <label for="document-input" id="label-input" class="active" draggable="true">
84
- <input type="file" id="document-input" hidden />
85
- <i class="fa fa-cloud-arrow-up"></i>
86
- <span>Drag and Drop or Select a File</span>
87
- </label>
88
- </div>
89
- <div class="file-container"></div>
90
- <div class="btn-wrapper">
91
- <button type="submit" id="summerize">Summarize</button>
92
- </div>
93
- </form>
94
- </div>
95
- </section>
96
-
97
- <section class="summary" id="summary">
98
- <div class="container summary-content">
99
- <h1 class="title">Summary</h1>
100
- <div class="summary-wrapper">
101
- <i class="fas fa-download" id="btn-download"></i>
102
- <p class="text-wrapper"></p>
103
- </div>
104
- </div>
105
- </section>
106
- </main>
107
-
108
- <footer>SmartDoc AI - 2025</footer>
109
- <div class="notifications">
110
- </div>
111
- <script src="static/scripts/summerize.js"></script>
112
- </body>
113
-
114
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/data-visualization.html ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Data Visualization - SmartDoc AI</title>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+
11
+ <link rel="stylesheet" href="static/styles/notification.css">
12
+ <link rel="stylesheet" href="static/styles/functions.css">
13
+
14
+ </head>
15
+
16
+ <body>
17
+ <header>
18
+ <nav class="container">
19
+ <div class="logo">
20
+ <a href="/">SmartDoc AI</a>
21
+ </div>
22
+ </nav>
23
+ </header>
24
+
25
+ <section class="hero">
26
+ <div class="container">
27
+ <div class="hero-content">
28
+ <h1>Turn Data into
29
+ <br>
30
+ Stunning Visuals
31
+ </h1>
32
+ <p>Transform your raw data into compelling visual stories with our AI-powered data visualization tool. Upload
33
+ your spreadsheets and let our system generate beautiful, insightful charts and graphs.</p>
34
+ </div>
35
+ </div>
36
+ </section>
37
+
38
+ <section class="reasons">
39
+ <div class="container">
40
+ <div class="section-header">
41
+ <h2>Why Choose Our Data Visualization AI</h2>
42
+ <div class="underline"></div>
43
+ </div>
44
+ <div class="reasons-grid">
45
+ <div class="reason-card">
46
+ <div class="reason-icon">📊</div>
47
+ <h3>Instant Insights</h3>
48
+ <p>Transform complex datasets into clear, actionable visualizations in seconds. Our AI identifies patterns and
49
+ relationships that might otherwise remain hidden.</p>
50
+ </div>
51
+
52
+ <div class="reason-card">
53
+ <div class="reason-icon">🎨</div>
54
+ <h3>Beautiful Design</h3>
55
+ <p>Generate professional-quality charts and graphs with optimal color schemes, typography, and layouts that
56
+ follow data visualization best practices.</p>
57
+ </div>
58
+
59
+ <div class="reason-card">
60
+ <div class="reason-icon">💡</div>
61
+ <h3>Smart Recommendations</h3>
62
+ <p>Our AI suggests the most effective visualization types based on your data structure, ensuring you
63
+ communicate your insights in the most impactful way.</p>
64
+ </div>
65
+
66
+ <div class="reason-card">
67
+ <div class="reason-icon">🔄</div>
68
+ <h3>Code Generation</h3>
69
+ <p>Get ready-to-use code for your visualizations that you can integrate into your projects, presentations, or
70
+ dashboards with minimal effort.</p>
71
+ </div>
72
+ </div>
73
+ </div>
74
+ </section>
75
+
76
+ <section class="steps">
77
+ <div class="container">
78
+ <div class="section-header">
79
+ <h2>How It Works</h2>
80
+ <div class="underline"></div>
81
+ </div>
82
+ <div class="steps-container">
83
+ <div class="step">
84
+ <div class="step-number">1</div>
85
+ <div class="step-line"></div>
86
+ <div class="step-content">
87
+ <h3>Upload Your Data</h3>
88
+ <p>Select and upload your Excel spreadsheet containing the data you want to visualize. Our system supports
89
+ various data formats and structures.</p>
90
+ </div>
91
+ </div>
92
+
93
+ <div class="step">
94
+ <div class="step-number">2</div>
95
+ <div class="step-line"></div>
96
+ <div class="step-content">
97
+ <h3>Describe Your Needs</h3>
98
+ <p>Tell us what kind of visualization you're looking for or what insights you want to highlight. Our AI will
99
+ use this to guide the visualization process.</p>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="step">
104
+ <div class="step-number">3</div>
105
+ <div class="step-line"></div>
106
+ <div class="step-content">
107
+ <h3>AI Processing</h3>
108
+ <p>Our advanced algorithms analyze your data, identify patterns and relationships, and generate the most
109
+ appropriate visualization based on your requirements.</p>
110
+ </div>
111
+ </div>
112
+
113
+ <div class="step">
114
+ <div class="step-number">4</div>
115
+ <div class="step-content">
116
+ <h3>Download and Use</h3>
117
+ <p>Get your visualization as an image file, along with the code used to create it. You can download, share,
118
+ or integrate it directly into your projects.</p>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </section>
124
+
125
+ <section class="upload">
126
+ <div class="container">
127
+ <div class="section-header">
128
+ <h2>Upload Your Data</h2>
129
+ <div class="underline"></div>
130
+ </div>
131
+ <div class="upload-container">
132
+ <div class="upload-box">
133
+ <div class="upload-icon">📈</div>
134
+ <div class="upload-text">
135
+ <h3>Select a Spreadsheet to Visualize</h3>
136
+ <p>Upload an Excel file (.xlsx) containing your data (max 1MB)</p>
137
+ </div>
138
+ <div class="file-input-container">
139
+ <label for="data-upload" class="file-input-label">Choose File</label>
140
+ <input type="file" id="data-upload" class="file-input" accept=".xlsx,.xls">
141
+ <div class="file-name" id="file-name">No file chosen</div>
142
+ </div>
143
+
144
+ <div class="prompt-container">
145
+ <label for="visualization-prompt" class="prompt-label">Describe the visualization you want:</label>
146
+ <textarea id="visualization-prompt" class="prompt-input"
147
+ placeholder="Example: Create a bar chart showing monthly sales by product category, highlighting the top-performing category"
148
+ rows="4"></textarea>
149
+ </div>
150
+
151
+ <button class="btn-primary" id="visualize-btn">Generate Visualization</button>
152
+
153
+ <div class="loading-container" id="loading-container">
154
+ <div class="loading-spinner"></div>
155
+ <div class="loading-text">Analyzing data and generating visualization...</div>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </section>
161
+
162
+ <section class="results" id="results-section">
163
+ <div class="container">
164
+ <div class="section-header">
165
+ <h2>Your Visualization</h2>
166
+ <div class="underline"></div>
167
+ </div>
168
+ <div class="results-container">
169
+ <div class="results-box">
170
+ <div class="results-header">
171
+ <div class="results-title">
172
+ <h3>Generated Chart</h3>
173
+ </div>
174
+ </div>
175
+
176
+ <div class="results-chart-container">
177
+ <img src="" alt="Generated Chart" class="results-chart" id="results-chart">
178
+ </div>
179
+
180
+ <div class="results-code-container">
181
+ <div class="results-code-header">
182
+ <div class="results-code-title">Generated Code</div>
183
+ </div>
184
+ <div class="results-code">
185
+ <pre id="code-content">
186
+
187
+ </pre>
188
+ </div>
189
+ </div>
190
+
191
+ <div class="results-actions">
192
+ <button class="btn-secondary" id="new-visualization-btn">New Visualization</button>
193
+ <button class="btn-primary" id="download-chart-btn">Download Chart</button>
194
+ <button class="btn-primary" id="download-code-btn">Download Code</button>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </section>
200
+
201
+ <footer>
202
+ <div class="container">
203
+ <div class="footer-content">
204
+ <div class="footer-logo">
205
+ <a href="/">SmartDoc AI</a>
206
+ <p>Intelligent Document Processing</p>
207
+ </div>
208
+
209
+ </div>
210
+ <div class="footer-bottom">
211
+ <p>&copy; 2025 SmartDoc AI.</p>
212
+ </div>
213
+ </div>
214
+ </footer>
215
+ <div class="notification-container"></div>
216
+ <script src="static/scripts/notifcation.js"></script>
217
+ <script src="static/scripts/data-visualisation.js"></script>
218
+
219
+
220
+
221
+ </body>
222
+
223
+ </html>
templates/image-interpretation.html ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Image Interpretation - SmartDoc AI</title>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+
11
+ <link rel="stylesheet" href="static/styles/notification.css">
12
+ <link rel="stylesheet" href="static/styles/functions.css">
13
+
14
+
15
+ </head>
16
+
17
+ <body>
18
+ <header>
19
+ <nav class="container">
20
+ <div class="logo">
21
+ <a href="/">SmartDoc AI</a>
22
+ </div>
23
+ </nav>
24
+ </header>
25
+
26
+ <section class="hero ">
27
+ <div class="container">
28
+ <div class="hero-content">
29
+ <h1>Unlock the Meaning Behind <br>
30
+ Your Images</h1>
31
+ <p>Unlock the insights hidden in your images with our advanced AI technology. From charts and graphs to complex
32
+ diagrams, our system analyzes and explains visual content with remarkable accuracy.</p>
33
+ </div>
34
+ </div>
35
+ </section>
36
+
37
+ <section class="reasons">
38
+ <div class="container">
39
+ <div class="section-header">
40
+ <h2>Why Choose Our Image Interpretation AI</h2>
41
+ <div class="underline"></div>
42
+ </div>
43
+ <div class="reasons-grid">
44
+ <div class="reason-card">
45
+ <div class="reason-icon">🔍</div>
46
+ <h3>Deep Visual Analysis</h3>
47
+ <p>Our AI can identify objects, patterns, and relationships within images, extracting meaningful data from
48
+ charts, graphs, and visual content in documents.</p>
49
+ </div>
50
+
51
+ <div class="reason-card">
52
+ <div class="reason-icon">📊</div>
53
+ <h3>Data Extraction</h3>
54
+ <p>Convert visual data from charts and graphs into actionable insights and structured data that you can use
55
+ for analysis and decision-making.</p>
56
+ </div>
57
+
58
+ <div class="reason-card">
59
+ <div class="reason-icon">🧩</div>
60
+ <h3>Context Understanding</h3>
61
+ <p>Our system doesn't just identify what's in an image—it understands the context and relationships between
62
+ elements to provide meaningful interpretations.</p>
63
+ </div>
64
+
65
+ <div class="reason-card">
66
+ <div class="reason-icon">⚡</div>
67
+ <h3>Time-Saving</h3>
68
+ <p>Automate the tedious process of manually analyzing visual content, allowing you to focus on applying the
69
+ insights rather than extracting them.</p>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </section>
74
+
75
+ <section class="steps">
76
+ <div class="container">
77
+ <div class="section-header">
78
+ <h2>How It Works</h2>
79
+ <div class="underline"></div>
80
+ </div>
81
+ <div class="steps-container">
82
+ <div class="step">
83
+ <div class="step-number">1</div>
84
+ <div class="step-line"></div>
85
+ <div class="step-content">
86
+ <h3>Upload Your Image</h3>
87
+ <p>Select and upload the image you want to analyze. We support various formats including JPG, PNG, GIF, and
88
+ more.</p>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="step">
93
+ <div class="step-number">2</div>
94
+ <div class="step-line"></div>
95
+ <div class="step-content">
96
+ <h3>AI Processing</h3>
97
+ <p>Our advanced computer vision algorithms analyze your image, identifying objects, patterns, text, and
98
+ relationships between visual elements.</p>
99
+ </div>
100
+ </div>
101
+
102
+ <div class="step">
103
+ <div class="step-number">3</div>
104
+ <div class="step-line"></div>
105
+ <div class="step-content">
106
+ <h3>Review Interpretation</h3>
107
+ <p>Receive a detailed interpretation of your image, including descriptions of content, data extraction from
108
+ charts, and contextual analysis.</p>
109
+ </div>
110
+ </div>
111
+
112
+ <div class="step">
113
+ <div class="step-number">4</div>
114
+ <div class="step-content">
115
+ <h3>Download or Share</h3>
116
+ <p>Save the interpretation as a text file or share it directly with colleagues. All your data is processed
117
+ securely and never stored without your permission.</p>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </section>
123
+
124
+ <section class="upload">
125
+ <div class="container">
126
+ <div class="section-header">
127
+ <h2>Upload Your Image</h2>
128
+ <div class="underline"></div>
129
+ </div>
130
+ <div class="upload-container">
131
+ <form class="upload-box">
132
+ <div class="upload-icon">🖼️</div>
133
+ <div class="upload-text">
134
+ <h3>Select an Image to Interpret</h3>
135
+ <p>Upload a JPG, PNG, or GIF file (max 5MB)</p>
136
+ </div>
137
+ <div class="file-input-container">
138
+ <label for="image-upload" class="file-input-label">Choose Image</label>
139
+ <input type="file" id="image-upload" class="file-input" accept="image/*">
140
+ <div class="file-name" id="file-name">No image chosen</div>
141
+ </div>
142
+
143
+ <div class="image-preview-container" id="image-preview-container">
144
+ <img src="" alt="Image Preview" class="image-preview" id="image-preview">
145
+ </div>
146
+
147
+ <button class="btn-primary" id="interpret-btn">Interpret Image</button>
148
+
149
+ <div class="loading-container" id="loading-container">
150
+ <div class="loading-spinner"></div>
151
+ <div class="loading-text">Analyzing image and generating interpretation...</div>
152
+ </div>
153
+ </form>
154
+ </div>
155
+ </div>
156
+ </section>
157
+
158
+ <section class="results" id="results-section">
159
+ <div class="container">
160
+ <div class="section-header">
161
+ <h2>Your Image Interpretation</h2>
162
+ <div class="underline"></div>
163
+ </div>
164
+ <div class="results-container">
165
+ <div class="results-box">
166
+ <div class="results-header">
167
+ <div class="results-title">
168
+ <h3>Image Analysis</h3>
169
+ </div>
170
+ </div>
171
+
172
+ <div class="results-image-container">
173
+ <img src="" alt="Analyzed Image" class="results-image" id="results-image">
174
+ </div>
175
+
176
+ <div class="results-content" id="interpretation-content">
177
+
178
+
179
+ </div>
180
+
181
+ <div class="results-actions">
182
+ <button class="btn-secondary" id="new-interpretation-btn">New Interpretation</button>
183
+ <button class="btn-primary" id="download-btn">Download Interpretation</button>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </div>
188
+ </section>
189
+
190
+ <footer>
191
+ <div class="container">
192
+ <div class="footer-content">
193
+ <div class="footer-logo">
194
+ <a href="/">SmartDoc AI</a>
195
+ <p>Intelligent Document Processing</p>
196
+ </div>
197
+
198
+ </div>
199
+ <div class="footer-bottom">
200
+ <p>&copy; 2025 SmartDoc AI.</p>
201
+ </div>
202
+ </div>
203
+ </footer>
204
+ <div class="notification-container"></div>
205
+ <script src="static/scripts/notifcation.js"></script>
206
+ <script src="static/scripts/ImageInterpretation.js"></script>
207
+
208
+ </body>
209
+
210
+ </html>
templates/index.html CHANGED
@@ -2,99 +2,120 @@
2
  <html lang="en">
3
 
4
  <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>SmartDoc AI</title>
8
- <link rel="stylesheet" href="static/styles/index.css" />
9
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" />
10
- <link rel="stylesheet" href="static/styles/notification.css" />
 
11
  </head>
12
 
13
  <body>
14
- <header>
15
- <div>
16
- <a href="/">SmartDoc AI </a>
17
- </div>
18
- </header>
19
- <main>
20
- <section class="hero">
21
- <img src="static/assests/g.svg" />
22
- <div class="hero-content">
23
- <h3>Welcome to SmartDoc AI</h3>
24
- <h1>
25
- Your All-in-one Tool for <br />document Summerization ,Image
26
- Interpretation <br />and Data Visualisation
27
- </h1>
28
- <div class="buttons">
29
- <a href="#features">get started</a>
30
- <a href="#about">learn more</a>
 
 
 
 
 
 
31
  </div>
32
- </div>
33
  </section>
34
 
35
  <section id="about" class="about">
36
- <img src="static/assests/Ilust.svg" />
37
- <img src="static/assests/Ilust.svg" />
38
- <div class="about-content">
39
- <h1 class="title">About SmartDoc AI</h1>
40
- <p>
41
- at SmartDoc AI ,we believe in empowering individuals and businesses
42
- with cutting-edge technology.Our mission is to streamline workflows
43
- by providing tools that are simple , efficient ,and reliable. Built
44
- with advanced AI Algorithms, our platform ensures accuracy and speed
45
- in every task.
46
- </p>
47
- </div>
48
- </section>
49
- <section id="features" class="features">
50
- <img src="static/assests/g.svg" />
51
- <div class="features-content">
52
- <h1 class="title">What can SmartDoc AI Do ?</h1>
53
- <div class="features-wrapper">
54
- <div class="feature">
55
- <i class="fas fa-file"></i>
56
- <h2>Document Summerization in Seconds</h2>
57
- <p>
58
- Upload Your document and let our AI generate concise summaries
59
- while retaining key information.
60
- </p>
61
- <div class="btn-wrapper">
62
- <a href="/summarization" class="btn">Try Now</a>
63
  </div>
64
- </div>
65
- <div class="feature">
66
- <i class="fa fa-image"></i>
67
- <h2>Interpret Images <br />with Ease</h2>
68
- <p>
69
- Upload images and our AI will analyze and describe their
70
- content,making visual data more accessible.
71
- </p>
72
- <div class="btn-wrapper">
73
- <a href="/imageinterpretation" class="btn">Try Now</a>
 
 
 
 
74
  </div>
75
- </div>
76
- <div class="feature">
77
- <i class="fa fa-chart-line"></i>
78
- <h2>
79
- Transform Data <br />
80
- into Visual Insights
81
- </h2>
82
- <p>
83
- Input raw data, and watch it transform into interactive charts
84
- and graphs for better understanding.
85
- </p>
86
- <div class="btn-wrapper">
87
- <a href="/datavisualisation" class="btn">Try Now</a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  </div>
89
- </div>
90
  </div>
91
- </div>
92
  </section>
93
- </main>
94
 
95
- <footer>SmartDoc AI - 2025</footer>
 
 
 
 
 
 
96
 
97
- <script src="static/scripts/notification.js"></script>
 
 
 
 
 
98
  </body>
99
 
100
  </html>
 
2
  <html lang="en">
3
 
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>SmartDoc AI - Intelligent Document Processing</title>
8
+ <link rel="stylesheet" href="static/styles/index.css">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <!-- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">-->
12
  </head>
13
 
14
  <body>
15
+ <header>
16
+ <nav class="container">
17
+ <div class="logo ">
18
+ <a href="/">SmartDoc AI</a>
19
+ </div>
20
+
21
+ </nav>
22
+ </header>
23
+
24
+ <section id="home" class="hero ">
25
+ <div class="container">
26
+ <div class="hero-content ">
27
+ <h1>Transform Your Documents with AI</h1>
28
+ <p>SmartDoc AI helps you extract insights, summarize content, and visualize data from your documents
29
+ with advanced artificial intelligence.</p>
30
+ <div class="hero-buttons">
31
+ <a href="#functions" class="btn-primary">Try for Free</a>
32
+ <a href="#about" class="btn-secondary">Learn More</a>
33
+ </div>
34
+ </div>
35
+ <div class="hero-image">
36
+ <img src="/placeholder.svg?height=400&width=500" alt="SmartDoc AI Dashboard Preview">
37
+ </div>
38
  </div>
 
39
  </section>
40
 
41
  <section id="about" class="about">
42
+ <div class="container">
43
+ <div class="section-header">
44
+ <h2>About SmartDoc AI</h2>
45
+ <div class="underline"></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  </div>
47
+ <div class="about-content">
48
+ <div class="about-image">
49
+ <img src="/placeholder.svg?height=350&width=450" alt="SmartDoc AI in action">
50
+ </div>
51
+ <div class="about-text">
52
+ <h3>Intelligent Document Processing</h3>
53
+ <p>SmartDoc AI is a cutting-edge document intelligence platform that leverages the latest
54
+ advancements in artificial intelligence to transform how you interact with documents and extract
55
+ valuable insights.</p>
56
+ <p>Our powerful AI engine can process various document formats, understand context, recognize
57
+ patterns, and present information in user-friendly formats, saving you hours of manual work.</p>
58
+ <p>Whether you're a researcher, business analyst, student, or professional, SmartDoc AI streamlines
59
+ your workflow by automating document analysis and helping you focus on what matters most.</p>
60
+ </div>
61
  </div>
62
+ </div>
63
+ </section>
64
+
65
+ <section id="functions" class="functions">
66
+ <div class="container">
67
+ <div class="section-header">
68
+ <h2>What SmartDoc AI Can Do</h2>
69
+ <div class="underline"></div>
70
+ </div>
71
+ <div class="functions-grid">
72
+ <div class="function-card animate">
73
+ <div class="function-icon">
74
+ <img src="/placeholder.svg?height=80&width=80" alt="Text Summarization Icon">
75
+ </div>
76
+ <h3>Text Summarization</h3>
77
+ <p>Extract key points and generate concise summaries from lengthy documents, articles, and reports
78
+ with our advanced NLP algorithms.</p>
79
+ <a href="/summarization" class="function-link">Learn More →</a>
80
+ </div>
81
+
82
+ <div class="function-card animate">
83
+ <div class="function-icon">
84
+ <img src="/placeholder.svg?height=80&width=80" alt="Image Interpretation Icon">
85
+ </div>
86
+ <h3>Image Interpretation</h3>
87
+ <p>Analyze charts, graphs, diagrams, and visual content within documents to extract meaningful data
88
+ and insights automatically.</p>
89
+ <a href="/imageinterpretation" class="function-link">Learn More →</a>
90
+ </div>
91
+
92
+ <div class="function-card animate">
93
+ <div class="function-icon">
94
+ <img src="/placeholder.svg?height=80&width=80" alt="Data Visualization Icon">
95
+ </div>
96
+ <h3>Data Visualization</h3>
97
+ <p>Transform complex data from your documents into clear, interactive visualizations that make
98
+ information easier to understand and share.</p>
99
+ <a href="/datavisualisation" class="function-link">Learn More →</a>
100
+ </div>
101
  </div>
 
102
  </div>
 
103
  </section>
 
104
 
105
+ <footer>
106
+ <div class="container">
107
+ <div class="footer-content">
108
+ <div class="footer-logo">
109
+ <a href="/">SmartDoc AI</a>
110
+ <p>Intelligent Document Processing</p>
111
+ </div>
112
 
113
+ </div>
114
+ <div class="footer-bottom">
115
+ <p>&copy; 2025 SmartDoc AI.</p>
116
+ </div>
117
+ </div>
118
+ </footer>
119
  </body>
120
 
121
  </html>
templates/text-summarization.html ADDED
@@ -0,0 +1,279 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Text Summarization - SmartDoc AI</title>
8
+ <link rel="preconnect" href="https://fonts.googleapis.com">
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
+
11
+ <link rel="stylesheet" href="static/styles/notification.css">
12
+ <link rel="stylesheet" href="static/styles/functions.css">
13
+
14
+ </head>
15
+
16
+ <body>
17
+ <header>
18
+ <nav class="container">
19
+ <div class="logo">
20
+ <a href="/">SmartDoc AI</a>
21
+ </div>
22
+ </nav>
23
+ </header>
24
+
25
+ <section class="hero">
26
+ <div class="container">
27
+ <div class="hero-content">
28
+ <h1>Summarize Your Documents <br>
29
+ in Seconds</h1>
30
+ <p>Transform lengthy documents into concise, accurate summaries with our advanced AI technology. Save time and
31
+ extract key insights from any text with just a few clicks.</p>
32
+ </div>
33
+ </div>
34
+ </section>
35
+
36
+ <section class="reasons">
37
+ <div class="container">
38
+ <div class="section-header">
39
+ <h2>Why Choose Our Summarization AI</h2>
40
+ <div class="underline"></div>
41
+ </div>
42
+ <div class="reasons-grid">
43
+ <div class="reason-card">
44
+ <div class="reason-icon">⚡</div>
45
+ <h3>Time Efficiency</h3>
46
+ <p>Reduce reading time by up to 80% while retaining all key information from your documents. Our AI quickly
47
+ identifies and extracts the most important points.</p>
48
+ </div>
49
+
50
+ <div class="reason-card">
51
+ <div class="reason-icon">🧠</div>
52
+ <h3>Advanced NLP</h3>
53
+ <p>Powered by state-of-the-art Natural Language Processing algorithms that understand context, identify key
54
+ concepts, and generate human-like summaries.</p>
55
+ </div>
56
+
57
+ <div class="reason-card">
58
+ <div class="reason-icon">📊</div>
59
+ <h3>Accuracy</h3>
60
+ <p>Our AI maintains the highest level of accuracy, ensuring that summaries capture the essential information
61
+ without missing critical details or context.</p>
62
+ </div>
63
+
64
+ <div class="reason-card">
65
+ <div class="reason-icon">🔄</div>
66
+ <h3>Customizable</h3>
67
+ <p>Adjust summary length and focus areas based on your specific needs. Get exactly the information you want,
68
+ in the format you prefer.</p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+ </section>
73
+
74
+ <section class="steps">
75
+ <div class="container">
76
+ <div class="section-header">
77
+ <h2>How It Works</h2>
78
+ <div class="underline"></div>
79
+ </div>
80
+ <div class="steps-container">
81
+ <div class="step">
82
+ <div class="step-number">1</div>
83
+ <div class="step-line"></div>
84
+ <div class="step-content">
85
+ <h3>Upload Your Document</h3>
86
+ <p>Select and upload the document you want to summarize. We support various formats including PDF, DOCX,
87
+ TXT, and more.</p>
88
+ </div>
89
+ </div>
90
+
91
+ <div class="step">
92
+ <div class="step-number">2</div>
93
+ <div class="step-line"></div>
94
+ <div class="step-content">
95
+ <h3>AI Processing</h3>
96
+ <p>Our advanced AI analyzes your document, identifying key concepts, main ideas, and important details while
97
+ understanding the context and relationships between ideas.</p>
98
+ </div>
99
+ </div>
100
+
101
+ <div class="step">
102
+ <div class="step-number">3</div>
103
+ <div class="step-line"></div>
104
+ <div class="step-content">
105
+ <h3>Review Summary</h3>
106
+ <p>Receive a concise, well-structured summary that captures the essence of your document. The summary
107
+ maintains the original meaning while significantly reducing length.</p>
108
+ </div>
109
+ </div>
110
+
111
+ <div class="step">
112
+ <div class="step-number">4</div>
113
+
114
+ <div class="step-content">
115
+ <h3>Download or Share</h3>
116
+ <p>Save your summary as a PDF or text file, or share it directly with colleagues. All your data is processed
117
+ securely and never stored without your permission.</p>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </section>
123
+
124
+ <section class="upload">
125
+ <div class="container">
126
+ <div class="section-header">
127
+ <h2>Upload Your Document</h2>
128
+ <div class="underline"></div>
129
+ </div>
130
+ <div class="upload-container">
131
+ <div class="upload-box">
132
+ <div class="upload-icon">📄</div>
133
+ <div class="upload-text">
134
+ <h3>Select a Document to Summarize</h3>
135
+ <p>Upload a PDF, DOCX, or TXT file (max 10MB)</p>
136
+ </div>
137
+ <div class="file-input-container">
138
+ <label for="document-upload" class="file-input-label">Choose File</label>
139
+ <input type="file" id="document-upload" class="file-input" accept=".pdf,.docx,.ppt,.xlsx">
140
+ <div class="file-name" id="file-name">No file chosen</div>
141
+ </div>
142
+ <button class="btn-primary" id="summarize-btn">Generate Summary</button>
143
+
144
+ <div class="loading-container" id="loading-container">
145
+ <div class="loading-spinner"></div>
146
+ <div class="loading-text">Analyzing document and generating summary...</div>
147
+ </div>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ </section>
152
+
153
+ <section class="results" id="results-section">
154
+ <div class="container">
155
+ <div class="section-header">
156
+ <h2>Your Summary</h2>
157
+ <div class="underline"></div>
158
+ </div>
159
+ <div class="results-container">
160
+ <div class="results-box">
161
+ <div class="results-header">
162
+ <div class="results-title">
163
+ <h3>Document Summary</h3>
164
+ </div>
165
+ </div>
166
+ <div class="results-content" id="summary-content">
167
+ <!-- <p>The document discusses the impact of artificial intelligence on modern business operations. Key points
168
+ include:</p>
169
+ <p>1. AI technologies are transforming how businesses analyze customer data, with 78% of companies reporting
170
+ improved decision-making after implementing AI solutions.</p>
171
+ <p>2. Machine learning algorithms can predict customer behavior with up to 85% accuracy when properly
172
+ trained on historical data.</p>
173
+ <p>3. Companies that have integrated AI into their workflow report an average 23% increase in operational
174
+ efficiency and 15% reduction in costs.</p>
175
+ <p>4. The most successful AI implementations focus on augmenting human capabilities rather than replacing
176
+ them, creating new roles focused on AI oversight and ethical considerations.</p>
177
+ <p>5. Future developments will likely center around more transparent AI systems that can explain their
178
+ decision-making processes to human operators.</p>-->
179
+ </div>
180
+ <div class="results-actions">
181
+ <button class="btn-secondary" id="new-summary-btn">New Summary</button>
182
+ <button class="btn-primary" id="download-btn">Download Summary</button>
183
+ </div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </section>
188
+
189
+ <footer>
190
+ <div class="container">
191
+ <div class="footer-content">
192
+ <div class="footer-logo">
193
+ <a href="/">SmartDoc AI</a>
194
+ <p>Intelligent Document Processing</p>
195
+ </div>
196
+ </div>
197
+ <div class="footer-bottom">
198
+ <p>&copy; 2025 SmartDoc AI.</p>
199
+ </div>
200
+ </div>
201
+ </footer>
202
+ <div class="notification-container"></div>
203
+ <script src="static/scripts/notifcation.js"></script>
204
+ <script src="static/scripts/text-summarization.js"></script>
205
+ <!--<script>
206
+ document.addEventListener('DOMContentLoaded', function () {
207
+ const fileInput = document.getElementById('document-upload');
208
+ const fileName = document.getElementById('file-name');
209
+ const summarizeBtn = document.getElementById('summarize-btn');
210
+ const loadingContainer = document.getElementById('loading-container');
211
+ const resultsSection = document.getElementById('results-section');
212
+ const newSummaryBtn = document.getElementById('new-summary-btn');
213
+ const downloadBtn = document.getElementById('download-btn');
214
+
215
+ // Display file name when a file is selected
216
+ fileInput.addEventListener('change', function () {
217
+ if (this.files && this.files[0]) {
218
+ fileName.textContent = this.files[0].name;
219
+ } else {
220
+ fileName.textContent = 'No file chosen';
221
+ }
222
+ });
223
+
224
+ // Show loading animation and then results when Generate Summary is clicked
225
+ summarizeBtn.addEventListener('click', function () {
226
+ if (fileInput.files.length === 0) {
227
+ alert('Please select a file first');
228
+ return;
229
+ }
230
+
231
+ // Show loading animation
232
+ loadingContainer.style.display = 'block';
233
+ summarizeBtn.disabled = true;
234
+
235
+ // Simulate processing time (3 seconds)
236
+ setTimeout(function () {
237
+ // Hide loading animation
238
+ loadingContainer.style.display = 'none';
239
+
240
+ // Show results section
241
+ resultsSection.style.display = 'block';
242
+
243
+ // Scroll to results
244
+ resultsSection.scrollIntoView({ behavior: 'smooth' });
245
+
246
+ // Re-enable button
247
+ summarizeBtn.disabled = false;
248
+ }, 3000);
249
+ });
250
+
251
+ // Reset form for a new summary
252
+ newSummaryBtn.addEventListener('click', function () {
253
+ fileInput.value = '';
254
+ fileName.textContent = 'No file chosen';
255
+ resultsSection.style.display = 'none';
256
+
257
+ // Scroll to upload section
258
+ document.querySelector('.upload').scrollIntoView({ behavior: 'smooth' });
259
+ });
260
+
261
+ // Simulate download functionality
262
+ downloadBtn.addEventListener('click', function () {
263
+ const summaryText = document.getElementById('summary-content').innerText;
264
+ const blob = new Blob([summaryText], { type: 'text/plain' });
265
+ const url = URL.createObjectURL(blob);
266
+
267
+ const a = document.createElement('a');
268
+ a.href = url;
269
+ a.download = 'document-summary.txt';
270
+ document.body.appendChild(a);
271
+ a.click();
272
+ document.body.removeChild(a);
273
+ URL.revokeObjectURL(url);
274
+ });
275
+ });
276
+ </script>-->
277
+ </body>
278
+
279
+ </html>