Spaces:
Sleeping
Sleeping
updates to README
Browse files
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
title: Boston School Choice
|
3 |
-
emoji:
|
4 |
colorFrom: pink
|
5 |
colorTo: purple
|
6 |
sdk: streamlit
|
@@ -9,62 +9,64 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
# Boston
|
13 |
|
14 |
-
|
15 |
|
16 |
-
## Features
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
## Technology Stack
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
|
34 |
-
## Setup and Installation
|
35 |
|
36 |
-
1.
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
|
43 |
-
2.
|
44 |
|
45 |
-
3.
|
46 |
|
47 |
-
4.
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
GEOAPIFY_KEY = "YOUR_ACTUAL_GEOAPIFY_API_KEY_HERE"
|
54 |
-
|
55 |
-
# Optional: Add Hugging Face Token if needed for model downloads
|
56 |
-
# HF_TOKEN = "YOUR_HUGGINGFACE_TOKEN_HERE"
|
57 |
-
```
|
58 |
-
* **Note:** Protect your API keys. `secrets.toml` is generally included in `.gitignore` for local development but is read by Streamlit Cloud and Hugging Face Spaces when deployed.
|
59 |
|
60 |
## Running the Application
|
61 |
|
62 |
-
|
63 |
|
64 |
## Usage
|
65 |
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
## Disclaimer
|
69 |
|
70 |
-
This chatbot
|
|
|
1 |
---
|
2 |
title: Boston School Choice
|
3 |
+
emoji: 🏫
|
4 |
colorFrom: pink
|
5 |
colorTo: purple
|
6 |
sdk: streamlit
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
# Boston School Choice Enrollment Assistant Chatbot
|
13 |
|
14 |
+
Welcome to the Boston School Choice Enrollment Assistant Chatbot! This application is designed to help families navigate the Boston Public Schools (BPS) enrollment process with ease. Using a combination of local language models and external APIs, the chatbot provides accurate and helpful information about school eligibility, required documents, and nearby schools based on user input.
|
15 |
|
16 |
+
## Key Features
|
17 |
|
18 |
+
- **Conversational Interface**: Interact naturally with the chatbot to get answers about BPS enrollment.
|
19 |
+
- **Context Tracking**: The chatbot remembers user-provided information such as residence and grade level.
|
20 |
+
- **Document Retrieval (RAG)**: Accesses local text files containing BPS rules and regulations to provide accurate answers.
|
21 |
+
- **Nearby School Lookup**: Utilizes the Geoapify API to find schools near a given Boston address.
|
22 |
+
- **Local LLM**: Runs inference locally using `llama-cpp-python` with a quantized Gemma-2B GGUF model.
|
23 |
|
24 |
## Technology Stack
|
25 |
|
26 |
+
- **Frontend**: [Streamlit](https://streamlit.io/)
|
27 |
+
- **LLM Inference**: [llama-cpp-python](https://github.com/abetlen/llama-cpp-python)
|
28 |
+
- **LLM Model**: `bartowski/gemma-2-2b-it-GGUF` (Q8_0 quantization)
|
29 |
+
- **Embeddings**: [sentence-transformers](https://www.sbert.net/) (`all-MiniLM-L6-v2`)
|
30 |
+
- **Vector Store**: [FAISS](https://faiss.ai/)
|
31 |
+
- **Geocoding/Places API**: [Geoapify](https://www.geoapify.com/)
|
32 |
+
- **Core Language**: Python 3
|
33 |
|
34 |
+
## Setup and Installation
|
35 |
|
36 |
+
1. **Repository Files**: Ensure the following files are present:
|
37 |
+
- `app.py`: Main Streamlit application script.
|
38 |
+
- `requirements.txt`: Lists all Python dependencies.
|
39 |
+
- `prompts.py`: Contains prompt strings for the LLM.
|
40 |
+
- `docs/`: Directory with `.txt` files for RAG.
|
41 |
+
- `.streamlit/secrets.toml`: For storing API keys.
|
42 |
|
43 |
+
2. **Dependencies**: Install necessary packages via `requirements.txt`.
|
44 |
|
45 |
+
3. **`docs/` Directory**: Create a `docs` directory and add relevant `.txt` files.
|
46 |
|
47 |
+
4. **API Keys**:
|
48 |
+
- Obtain a Geoapify API key for geocoding and school lookup features.
|
49 |
+
- Store the key in `.streamlit/secrets.toml`:
|
50 |
+
```toml
|
51 |
+
GEOAPIFY_KEY = "YOUR_ACTUAL_GEOAPIFY_API_KEY_HERE"
|
52 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
## Running the Application
|
55 |
|
56 |
+
Deploy the application on Hugging Face Spaces. Ensure all files are correctly set up in the repository for automatic build and run.
|
57 |
|
58 |
## Usage
|
59 |
|
60 |
+
Type your questions into the input box at the bottom of the application. Provide information like your address or your child's grade when prompted. The chatbot will use this context, along with retrieved documents and external lookups, to assist you.
|
61 |
+
|
62 |
+
## Contributing
|
63 |
+
|
64 |
+
We welcome contributions! Please fork the repository and submit a pull request with your changes.
|
65 |
+
|
66 |
+
## License
|
67 |
+
|
68 |
+
This project is licensed under the MIT License.
|
69 |
|
70 |
## Disclaimer
|
71 |
|
72 |
+
This chatbot provides information based on documents in the `docs/` directory and external APIs. Always verify critical information with official BPS resources or a BPS Welcome Center. The information provided is not guaranteed to be 100% accurate or up-to-date.
|