mtwesley commited on
Commit
2ec9ce2
·
1 Parent(s): 32769d4

updates to README

Browse files
Files changed (1) hide show
  1. README.md +42 -40
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 Public Schools Enrollment Assistant Chatbot
13
 
14
- This is a Streamlit-based conversational chatbot designed to assist families in navigating the Boston Public Schools (BPS) enrollment process. It uses a local language model (Gemma-2B via llama-cpp) combined with Retrieval-Augmented Generation (RAG) and external APIs to answer questions about school eligibility, required documents, and nearby schools based on user-provided information.
15
 
16
- ## Features
17
 
18
- * **Conversational Interface:** Ask questions naturally about BPS enrollment.
19
- * **Context Tracking:** Remembers information provided during the conversation (residence, grade, etc.) using a JSON structure.
20
- * **Document Retrieval (RAG):** Uses information from local text files (in the `docs/` directory) containing BPS rules and regulations to answer questions accurately.
21
- * **Nearby School Lookup:** Uses the Geoapify API to find schools near a provided Boston residence address.
22
- * **Local LLM:** Runs inference locally using `llama-cpp-python` with a quantized Gemma-2B GGUF model, suitable for CPU execution on platforms like Hugging Face Spaces free tier.
23
 
24
  ## Technology Stack
25
 
26
- * **Frontend:** Streamlit
27
- * **LLM Inference:** `llama-cpp-python`
28
- * **LLM Model:** `bartowski/gemma-2-2b-it-GGUF` (Q8_0 quantization)
29
- * **Embeddings:** `sentence-transformers` (`all-MiniLM-L6-v2`)
30
- * **Vector Store:** FAISS (CPU)
31
- * **Geocoding/Places API:** Geoapify
32
- * **Core Language:** Python 3
33
 
34
- ## Setup and Installation (for Hugging Face Spaces)
35
 
36
- 1. **Repository Files:** Ensure the following files are present in your Hugging Face Space repository:
37
- * `app.py`: The main Streamlit application script.
38
- * `requirements.txt`: Lists all Python dependencies.
39
- * `prompts.py`: Contains the prompt strings for the LLM.
40
- * `docs/`: A directory containing `.txt` files with BPS enrollment information used for RAG. **You must create this directory and add the relevant text files.**
41
- * `.streamlit/secrets.toml`: (Optional but recommended) For storing API keys.
42
 
43
- 2. **Dependencies:** The `requirements.txt` file ensures all necessary packages are installed automatically by Hugging Face Spaces.
44
 
45
- 3. **`docs/` Directory:** Create a directory named `docs` in the root of your repository. Place all the `.txt` files containing the Boston Public Schools information you want the chatbot to reference inside this directory. The RAG system relies on these files.
46
 
47
- 4. **API Keys:**
48
- * **Geoapify:** You need a Geoapify API key for the geocoding and nearby school lookup features.
49
- * Create a file named `secrets.toml` inside a directory named `.streamlit` in your repository (i.e., `.streamlit/secrets.toml`).
50
- * Add your Geoapify key to this file:
51
- ```toml
52
- # .streamlit/secrets.toml
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
- This application is designed to be deployed on Hugging Face Spaces. Once the files (`app.py`, `requirements.txt`, `prompts.py`, `docs/` directory, `.streamlit/secrets.toml`) are correctly set up in the repository, Hugging Face Spaces should automatically build and run the Streamlit application.
63
 
64
  ## Usage
65
 
66
- Interact with the chatbot by typing your questions into the input box at the bottom of the application. Provide information like your address or your child's grade when asked, and the chatbot will use this context, along with retrieved documents and external lookups, to assist you.
 
 
 
 
 
 
 
 
67
 
68
  ## Disclaimer
69
 
70
- This chatbot aims to provide helpful information based on the documents provided in the `docs/` directory and external APIs. However, **Boston Public Schools enrollment rules and policies can change.** Always verify critical information directly with official BPS resources or a BPS Welcome Center before making decisions. The information provided by this chatbot is not guaranteed to be 100% accurate or up-to-date and should be used as a guide only.
 
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.