Skip to content

Commit 15c3e64

Browse files
committed
Merge branch 'listOfMed' into 345-add-rag-to-the-chatbot
2 parents 674c8c3 + 9c403dd commit 15c3e64

File tree

15 files changed

+738
-355
lines changed

15 files changed

+738
-355
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,29 @@ Tools used for development:
3636

3737
### Running Balancer for development
3838

39-
Running Balancer:
40-
- Start Docker Desktop and run `docker compose up --build`
41-
- The email and password are set in `server/api/management/commands/createsu.py`
42-
- Download a sample of papers to upload from [https://balancertestsite.com](https://balancertestsite.com/)
39+
Start the Postgres, Django REST, and React services by starting Docker Desktop and running `docker compose up --build`
4340

44-
Running pgAdmin:
41+
#### Postgres
42+
- Download a sample of papers to upload from [https://balancertestsite.com](https://balancertestsite.com/)
4543
- The email and password of `pgAdmin` are specified in `balancer-main/docker-compose.yml`
46-
- The first time you use `pgAdmin` after building the Docker containers you will need to register the server.
47-
The `Host name/address`, `Username` and `Password` are specified in `balancer-main/docker-compose.yml`
44+
- The first time you use `pgAdmin` after building the Docker containers you will need to register the server.
45+
- The `Host name/address` is the Postgres server service name in the Docker Compose file
46+
- The `Username` and `Password` are the Postgres server environment variables in the Docker Compose file
47+
- You can use the below code snippet to query the database from a Jupyter notebook:
48+
49+
```
50+
from sqlalchemy import create_engine
51+
import pandas as pd
52+
53+
engine = create_engine("postgresql+psycopg2://balancer:balancer@localhost:5433/balancer_dev")
54+
55+
query = "SELECT * FROM api_embeddings;"
56+
57+
df = pd.read_sql(query, engine)
58+
```
59+
60+
#### Django REST
61+
- The email and password are set in `server/api/management/commands/createsu.py`
4862

4963
## Local Kubernetes Deployment
5064

frontend/src/App.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The heading directly under the nav bar.
170170
}
171171

172172
.desc1 {
173-
@apply mx-auto mt-5 hidden max-w-[75%] text-center font-satoshi text-lg text-gray-400 sm:text-xl md:block;
173+
@apply mx-auto mt-5 text-center font-satoshi text-lg text-gray-800 sm:text-xl md:block;
174174
font-size: 100%;
175175
letter-spacing: 0.03em;
176176
}

frontend/src/components/Footer/Footer.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ function Footer() {
2828

2929
return (
3030
// <div className="xl:px-50 mx-auto hidden h-20 items-center justify-between border-t border-gray-300 bg-white px-4 sm:px-6 md:px-8 lg:flex lg:px-8 2xl:px-56">
31-
<div className=" mt-20 flex w-full border-t border-gray-300 ">
31+
<div className="mt-20 flex w-full border-t border-gray-300 ">
3232
{/* <div className="footer-content footer-content mr-5 mt-5 rounded-md border-l border-r border-t border-gray-300 "> */}{" "}
3333
{/* Added mt-5 and mr-5 */}
3434
<footer className=" font_body mt-10 w-full ">
35-
<div className="m-auto grid max-w-[900px] grid-cols-2 flex-wrap items-center justify-between gap-5 px-5 py-3 md:grid-cols-5 md:py-12">
35+
<div className="m-auto grid max-w-[900px] sm:justify-center md:grid-cols-6 md:py-12 lg:grid-cols-6 flex-wrap items-center md:justify-between gap-4 px-5 py-3">
3636
<Link
3737
to="/"
3838
className=" flex justify-center text-black hover:border-blue-600 hover:text-blue-600 hover:no-underline"
@@ -61,6 +61,12 @@ function Footer() {
6161
>
6262
Leave feedback
6363
</Link>
64+
<a href="https://www.flipcause.com/secure/cause_pdetails/MjMyMTIw"
65+
target="_blank"
66+
className="flex justify-center text-black hover:border-blue-600 hover:text-blue-600 hover:no-underline"
67+
>
68+
Donate
69+
</a>
6470
<Link
6571
to="/help"
6672
className="flex justify-center text-black hover:border-blue-600 hover:text-blue-600 hover:no-underline"

frontend/src/components/Header/FeatureMenuDropDown.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
1-
import { Link } from "react-router-dom";
1+
import { Link, useLocation } from "react-router-dom";
22

33
export const FeatureMenuDropDown = () => {
4+
const location = useLocation();
5+
const currentPath = location.pathname;
46
return (
57
<div className="h-50 absolute top-full mb-2 mt-2 flex flex-row items-center rounded-lg border-2 bg-white font-inter text-sm sm:px-6 md:px-8 lg:px-8 xl:px-6 ">
68
<div className="mx-3 my-5 ">
79
<Link to="/AdminPortal">
8-
<ul className=" cursor-pointer rounded-lg p-3 transition duration-300 hover:bg-gray-100">
9-
<span className=" font-bold text-black ">Manage files</span>
10+
<ul className={currentPath === "/AdminPortal" ? "subheader-nav-item subheader-nav-item-selected" : "subheader-nav-item"}>
11+
<span className="font-bold">Manage files</span>
1012

1113
<div className="mt-1 font-satoshi text-sm text-gray-400">
12-
Mange and chat with files.
14+
Manage and chat with files
1315
</div>
1416
</ul>
1517
</Link>
1618
<Link to="/rulesmanager">
17-
<ul className=" cursor-pointer rounded-lg p-3 transition duration-300 hover:bg-gray-100">
18-
<span className=" font-bold text-black ">Manage rules</span>
19+
<ul className={currentPath === "/rulesmanager" ? "subheader-nav-item subheader-nav-item-selected" : "subheader-nav-item"}>
20+
<span className="font-bold">Manage rules</span>
1921

2022
<div className="mt-1 font-satoshi text-sm text-gray-400">
2123
Manage list of rules
2224
</div>
2325
</ul>
2426
</Link>
2527
<Link to="/ManageMeds">
26-
<ul className=" cursor-pointer rounded-lg p-3 transition duration-300 hover:bg-gray-100">
27-
<span className=" font-bold text-black ">Manage meds</span>
28+
<ul className={currentPath === "/ManageMeds" ? "subheader-nav-item subheader-nav-item-selected" : "subheader-nav-item"}>
29+
<span className="font-bold">Manage meds</span>
2830

2931
<div className="mt-1 font-satoshi text-sm text-gray-400">
3032
Manage list of meds
3133
</div>
3234
</ul>
3335
</Link>
34-
{/*
36+
{/*
3537
<Link to="/drugSummary">
3638
<ul className=" cursor-pointer rounded-lg p-3 transition duration-300 hover:bg-gray-100">
3739
<span className=" font-bold text-black ">Manage Prompts</span>
@@ -63,4 +65,4 @@ export const FeatureMenuDropDown = () => {
6365
</div>
6466
</div>
6567
);
66-
};
68+
};

0 commit comments

Comments
 (0)