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
File size: 2,559 Bytes
09281fe | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | #!/usr/bin/env python3
"""
Test Upload Endpoint
This script tests the file upload functionality
"""
import requests
import os
# Your ngrok URL
BASE_URL = "https://0468c638cef7.ngrok-free.app"
def test_upload():
"""Test file upload"""
print("π§ͺ Testing File Upload...")
# Check if we have a test file
test_files = ["doc2.pdf", "main.py", "app.py"]
test_file = None
for file in test_files:
if os.path.exists(file):
test_file = file
break
if not test_file:
print("β No test file found. Please ensure you have a PDF file in the directory.")
return False
print(f"π Using test file: {test_file}")
url = f"{BASE_URL}/hackrx/upload"
try:
with open(test_file, 'rb') as f:
files = {'file': (test_file, f, 'application/pdf')}
print(f"β³ Uploading {test_file}...")
response = requests.post(url, files=files, timeout=60)
print(f"Status: {response.status_code}")
if response.status_code == 200:
print("β
Upload successful!")
result = response.json()
print(f"Response: {result}")
return True
else:
print(f"β Upload failed: {response.text}")
return False
except Exception as e:
print(f"β Error: {e}")
return False
def test_health_first():
"""Test health endpoint first"""
print("π§ͺ Testing Health Endpoint...")
try:
response = requests.get(f"{BASE_URL}/api/health", timeout=10)
if response.status_code == 200:
print("β
Health check passed!")
return True
else:
print(f"β Health check failed: {response.text}")
return False
except Exception as e:
print(f"β Error: {e}")
return False
def main():
"""Run upload test"""
print("π Upload Test")
print("=" * 40)
# Test health first
if not test_health_first():
print("\nβ Server not responding. Make sure Flask server is running!")
print("Run: python app.py")
return
# Test upload
test_upload()
print("\n" + "=" * 40)
print("π POSTMAN UPLOAD GUIDE")
print("=" * 40)
print("1. Method: POST")
print(f"2. URL: {BASE_URL}/hackrx/upload")
print("3. Body: form-data")
print("4. Key: file (Type: File)")
print("5. Value: Select your PDF file")
print("=" * 40)
if __name__ == "__main__":
main() |