Instructions to use Navaneeth-14/rag-hackathon-app with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Navaneeth-14/rag-hackathon-app with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Navaneeth-14/rag-hackathon-app:Q4_K_M # Run inference directly in the terminal: llama cli -hf Navaneeth-14/rag-hackathon-app:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Navaneeth-14/rag-hackathon-app:Q4_K_M # Run inference directly in the terminal: llama cli -hf Navaneeth-14/rag-hackathon-app:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Navaneeth-14/rag-hackathon-app:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Navaneeth-14/rag-hackathon-app:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Navaneeth-14/rag-hackathon-app:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Navaneeth-14/rag-hackathon-app:Q4_K_M
Use Docker
docker model run hf.co/Navaneeth-14/rag-hackathon-app:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Navaneeth-14/rag-hackathon-app with Ollama:
ollama run hf.co/Navaneeth-14/rag-hackathon-app:Q4_K_M
- Unsloth Studio
How to use Navaneeth-14/rag-hackathon-app with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Navaneeth-14/rag-hackathon-app to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Navaneeth-14/rag-hackathon-app to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Navaneeth-14/rag-hackathon-app to start chatting
- Docker Model Runner
How to use Navaneeth-14/rag-hackathon-app with Docker Model Runner:
docker model run hf.co/Navaneeth-14/rag-hackathon-app:Q4_K_M
- Lemonade
How to use Navaneeth-14/rag-hackathon-app with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Navaneeth-14/rag-hackathon-app:Q4_K_M
Run and chat with the model
lemonade run user.rag-hackathon-app-Q4_K_M
List all available models
lemonade list
- Atomic Chat
| #!/usr/bin/env python3 | |
| """ | |
| Test script to isolate document processing issues | |
| """ | |
| import os | |
| import sys | |
| import time | |
| from pathlib import Path | |
| def test_document_processor(): | |
| """Test the document processor directly""" | |
| print("π TESTING DOCUMENT PROCESSOR") | |
| print("=" * 40) | |
| try: | |
| from document_processer import AdvancedDocumentProcessor | |
| # Initialize processor | |
| processor = AdvancedDocumentProcessor() | |
| print("β Document processor initialized") | |
| # Test with doc2.pdf | |
| file_path = "doc2.pdf" | |
| if not os.path.exists(file_path): | |
| print(f"β File not found: {file_path}") | |
| return | |
| print(f"π Processing file: {file_path}") | |
| # Test without OCR | |
| print("\n--- Testing without OCR ---") | |
| start_time = time.time() | |
| try: | |
| chunks = processor.process_document(file_path, use_ocr=False) | |
| processing_time = time.time() - start_time | |
| print(f"β Success! Processed {len(chunks)} chunks in {processing_time:.2f}s") | |
| # Show first chunk | |
| if chunks: | |
| print(f"π First chunk preview:") | |
| print(f" ID: {chunks[0].chunk_id}") | |
| print(f" Content: {chunks[0].content[:100]}...") | |
| print(f" Source: {chunks[0].source_file}") | |
| except Exception as e: | |
| print(f"β Failed without OCR: {e}") | |
| # Test with OCR | |
| print("\n--- Testing with OCR ---") | |
| start_time = time.time() | |
| try: | |
| chunks = processor.process_document(file_path, use_ocr=True) | |
| processing_time = time.time() - start_time | |
| print(f"β Success! Processed {len(chunks)} chunks in {processing_time:.2f}s") | |
| # Show first chunk | |
| if chunks: | |
| print(f"π First chunk preview:") | |
| print(f" ID: {chunks[0].chunk_id}") | |
| print(f" Content: {chunks[0].content[:100]}...") | |
| print(f" Source: {chunks[0].source_file}") | |
| except Exception as e: | |
| print(f"β Failed with OCR: {e}") | |
| except Exception as e: | |
| print(f"β Error initializing document processor: {e}") | |
| def test_vector_database(): | |
| """Test the vector database directly""" | |
| print("\nπ TESTING VECTOR DATABASE") | |
| print("=" * 40) | |
| try: | |
| from vector_database import VectorDatabase | |
| # Initialize vector database | |
| vector_db = VectorDatabase() | |
| print("β Vector database initialized") | |
| # Test adding a simple document | |
| test_content = "This is a test document for vector database testing." | |
| test_metadata = { | |
| 'source_file': 'test.txt', | |
| 'file_type': 'text', | |
| 'section_type': 'test' | |
| } | |
| print("π Adding test document...") | |
| success = vector_db.add_document(test_content, test_metadata) | |
| if success: | |
| print("β Successfully added test document") | |
| # Test search | |
| print("π Testing search...") | |
| results = vector_db.search_documents("test document", n_results=3) | |
| print(f"β Search returned {len(results)} results") | |
| else: | |
| print("β Failed to add test document") | |
| except Exception as e: | |
| print(f"β Error with vector database: {e}") | |
| def test_rag_system(): | |
| """Test the RAG system directly""" | |
| print("\nπ TESTING RAG SYSTEM") | |
| print("=" * 40) | |
| try: | |
| from rag_system import AdvancedRAGSystem | |
| # Initialize RAG system | |
| print("π Initializing RAG system...") | |
| rag_system = AdvancedRAGSystem(use_gpu=False) # Use CPU for testing | |
| print("β RAG system initialized") | |
| # Test document ingestion | |
| file_path = "doc2.pdf" | |
| if os.path.exists(file_path): | |
| print(f"π Testing document ingestion: {file_path}") | |
| try: | |
| chunks = rag_system.ingest_document(file_path, use_ocr=False) | |
| print(f"β Successfully ingested {len(chunks)} chunks") | |
| except Exception as e: | |
| print(f"β Document ingestion failed: {e}") | |
| else: | |
| print(f"β File not found: {file_path}") | |
| except Exception as e: | |
| print(f"β Error with RAG system: {e}") | |
| def main(): | |
| """Run all tests""" | |
| print("π§ͺ DOCUMENT PROCESSING DIAGNOSTICS") | |
| print("=" * 50) | |
| # Test 1: Document processor | |
| test_document_processor() | |
| # Test 2: Vector database | |
| test_vector_database() | |
| # Test 3: RAG system | |
| test_rag_system() | |
| print("\nβ Diagnostics completed!") | |
| if __name__ == "__main__": | |
| main() |