Spaces:
Sleeping
Sleeping
|
Download README.md from Arcelily/simple-qa-app: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/spaces/Arcelily/simple-qa-app/resolve/main/README.md
- Command line
-
hf download hf://spaces/Arcelily/simple-qa-app/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Arcelily/simple-qa-app/resolve/main/README.md
1.34 kB
| title: SimpleQnA | |
| emoji: "π" | |
| colorFrom: red | |
| colorTo: red | |
| sdk: docker | |
| app_port: 8501 | |
| tags: | |
| - streamlit | |
| pinned: false | |
| short_description: Streamlit template space for a simple QA app | |
| # Simple QA with LangChain (Open-Source LLM) | |
| This Space demonstrates a minimal Retrieval-Augmented Generation (RAG) app: | |
| - Upload PDFs or paste text π | |
| - Build a FAISS index with MiniLM embeddings π§ | |
| - Ask grounded questions with an open-source LLM (default: `Qwen/Qwen2.5-1.5B-Instruct`) π¬ | |
| ## How to use | |
| 1. Upload a PDF or paste text in **Knowledge Base**. | |
| 2. Click **Build Knowledge Base**. | |
| 3. Type a question and click **Get Answer**. | |
| 4. (Optional) Toggle **Show retrieved chunks** to inspect sources. | |
| ## Swap the model | |
| Change the model in the sidebar (e.g., `TinyLlama/TinyLlama-1.1B-Chat-v1.0`). | |
| ## Run locally | |
| 1. Create & activate a venv: | |
| ```bash | |
| python -m venv .venv | |
| source .venv/bin/activate # Windows: .venv\\Scripts\\activate | |
| ``` | |
| 2. Install dependencies: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. Run: | |
| ```bash | |
| streamlit run streamlit_app.py | |
| ``` | |
| ## Deploy to Hugging Face Spaces | |
| 1. Create a new Space (Type: Streamlit). | |
| 2. Upload these files: `streamlit_app.py`, `requirements.txt`, `README.md`, `runtime.txt`, `Dockerfile`. | |
| 3. Wait for the build to finish β the app will auto-start. | |