From d0449d97f80280213c6b6f342498d6b016693c6b Mon Sep 17 00:00:00 2001 From: commit111 Date: Thu, 28 Nov 2024 12:02:38 -0800 Subject: [PATCH 1/6] added white defang logo at top-center --- app/templates/imgs/defang_icon.svg | 1 + app/templates/index.html | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 app/templates/imgs/defang_icon.svg diff --git a/app/templates/imgs/defang_icon.svg b/app/templates/imgs/defang_icon.svg new file mode 100644 index 0000000..79a6822 --- /dev/null +++ b/app/templates/imgs/defang_icon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/templates/index.html b/app/templates/index.html index fce686a..fc43cdf 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -32,9 +32,22 @@ box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); } + .img-container { + height: 2em; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + } + + .icon { + height: 2.5em; + } + h2 { text-align: center; color: #fff; + margin-top: 10px; margin-bottom: 20px; font-weight: 300; font-size: 1.5rem; @@ -134,6 +147,9 @@
+
+ +

Ask Defang

From 7c9c778f38d496e30ec5f3966e0a6b205f6b9b3e Mon Sep 17 00:00:00 2001 From: commit111 Date: Thu, 28 Nov 2024 15:13:04 -0800 Subject: [PATCH 2/6] make the image display properly --- app/app.py | 2 +- app/requirements.txt | 2 +- app/templates/{imgs => images}/defang_icon.svg | 0 app/templates/index.html | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename app/templates/{imgs => images}/defang_icon.svg (100%) diff --git a/app/app.py b/app/app.py index faf6bda..abf3702 100644 --- a/app/app.py +++ b/app/app.py @@ -1,7 +1,7 @@ from flask import Flask, request, jsonify, render_template, Response, stream_with_context from rag_system import rag_system import subprocess -app = Flask(__name__) +app = Flask(__name__, static_folder='templates/images') @app.route('/', methods=['GET', 'POST']) def index(): diff --git a/app/requirements.txt b/app/requirements.txt index dff8006..aed5490 100644 --- a/app/requirements.txt +++ b/app/requirements.txt @@ -1,5 +1,5 @@ Flask==2.0.1 -Werkzeug==3.0.6 +Werkzeug==2.2.2 scikit-learn==0.24.2 numpy==1.21.0 sentence-transformers==2.1.0 diff --git a/app/templates/imgs/defang_icon.svg b/app/templates/images/defang_icon.svg similarity index 100% rename from app/templates/imgs/defang_icon.svg rename to app/templates/images/defang_icon.svg diff --git a/app/templates/index.html b/app/templates/index.html index fc43cdf..5305c7f 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -148,7 +148,7 @@
- + defang_icon

Ask Defang

From 7b5907c06ce7ae6426cf30b2acc60593ac0dbc62 Mon Sep 17 00:00:00 2001 From: commit111 Date: Thu, 28 Nov 2024 15:54:13 -0800 Subject: [PATCH 3/6] font change for consistency --- app/templates/index.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/templates/index.html b/app/templates/index.html index 5305c7f..bd6790a 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -5,9 +5,12 @@ Ask Defang +