Vancey/USTP_HB
0
π USTP Handbook Chatbot (Streamlit)
This Hugging Face Space hosts an intelligent chatbot that answers student queries using the USTP Student Handbook (2021 Edition) as its knowledge base.
Built for the University of Science and Technology of Southern Philippines (USTP) students, this chatbot provides fast, accurate, and context-aware responses based on official handbook content.
π§ Overview
The USTP Handbook Chatbot uses:
- PDF text extraction (via
PyPDF2) - Semantic search (via
sentence-transformers+FAISS) - Generative AI (via the Perplexity AI API)
This setup allows the model to retrieve relevant sections from the handbook and generate concise, grounded answers β using a retrieval-augmented generation (RAG) pipeline.
βοΈ Tech Stack
π How to Use
- Open this Hugging Face Space.
- The app automatically loads and indexes the USTP Handbook PDF.
- Type any question about student policies, rights, or rules.
- The chatbot retrieves relevant context and generates an answer.
Example:
π¬ βWhat is the proper dress code for students at USTP?β
β Returns the related section from the handbook and a summarized explanation.
π API Setup (for Perplexity)
To enable Perplexity AI integration:
- Go to your Spaceβs Settings β Repository secrets.
- Add the following key:
- Paste your actual API key as the value.
- Save the secret β it will load automatically at runtime.
π File Structure
π₯οΈ Run Locally (Optional)
If you want to test it locally before pushing to Hugging Face:
git clone https://huggingface.co/spaces/Vancey/USTP_HB
cd USTP_HB
pip install -r requirements.txt
streamlit run app.py
