Starburst15's picture
Update README.md
108a9c0 verified
|
raw
history blame
2.21 kB
metadata
title: USTP Student Handbook Assistant
emoji: πŸ“˜
colorFrom: purple
colorTo: indigo
sdk: streamlit
sdk_version: 1.39.0
app_file: src/streamlit_app.py
pinned: false
license: mit

πŸ“˜ USTP Student Handbook Assistant (2023 Edition)

This Streamlit app lets students, faculty, and staff ask questions about the USTP Student Handbook (2023 Edition) and get accurate, page-referenced answers directly from the document β€” powered by FAISS, Sentence Transformers, and open-source LLMs such as Mistral, Mixtral, and Qwen.


πŸš€ Features

βœ… Reads and indexes the USTP Student Handbook 2023 Edition PDF
βœ… Fast semantic search with FAISS vector database
βœ… Accurate citation with printed page numbers, not raw PDF indices
βœ… Choose between multiple open-source models (Mistral, Mixtral, Qwen, etc.)
βœ… Offline-safe β€” works even without API tokens
βœ… Automatic local embedding with MiniLM for fast responses
βœ… Caches index for instant re-use


🧠 LLM Integration (Optional)

You can enhance the assistant’s responses with Hugging Face Inference API or run it completely offline using local models.

πŸ”‘ To configure:

  1. Create a .env file in the app root directory.
  2. Add your Hugging Face token (optional): HF_TOKEN = your_huggingface_token
  3. Save the file and restart the app.

πŸ’‘ If you don’t provide a token, the app will automatically use a local SentenceTransformer model for embeddings.


πŸ› οΈ Deployment Notes

  • Runtime: Python SDK
  • SDK: Streamlit
  • App file: src/streamlit_app.py
  • PDF file: Must be named USTP Student Handbook 2023 Edition.pdf and placed in the same directory.
  • Recommended visibility: Public (for demo and student access)
  • Supported models:
  • mistralai/Mistral-7B-Instruct-v0.3
  • mistralai/Mixtral-8x7B-Instruct-v0.1
  • Qwen/Qwen2.5-14B-Instruct

βš™οΈ Troubleshooting

⚠️ β€œPermission denied: '/.streamlit'”

If deploying in a restricted environment:

  • Set the working directory to a writable path (e.g., /home/appuser/app).
  • Or run:
mkdir -p ~/.streamlit