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: 4,374 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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | #!/usr/bin/env python3
"""
Test script for hackathon API format
Matches the exact requirements from the hackathon
"""
import requests
import json
# Your ngrok URL
BASE_URL = "https://0468c638cef7.ngrok-free.app"
def test_hackathon_format():
"""Test the hackathon API format"""
print("π§ͺ Testing Hackathon API Format...")
url = f"{BASE_URL}/hackrx/run"
# Headers as required by hackathon
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer e6dfe3fbc81eaccabae37a2960e15bc85abe1d3e710777adbbae47ee6b4b4fae" # Any API key works for testing
}
# Request body as required by hackathon
payload = {
"documents": "https://hackrx.blob.core.windows.net/assets/policy.pdf?sv=2023-01-03&st=2025-07-04T09%3A11%3A24Z&se=2027-07-05T09%3A11%3A00Z&sr=b&sp=r&sig=N4a9OU0w0QXO6AOIBiu4bpl7AXvEZogeT%2FjUHNO7HzQ%3D",
"questions": [
"What is the grace period for premium payment under the National Parivar Mediclaim Plus Policy?",
"What is the waiting period for pre-existing diseases (PED) to be covered?",
"Does this policy cover maternity expenses, and what are the conditions?",
"What is the waiting period for cataract surgery?",
"Are the medical expenses for an organ donor covered under this policy?"
]
}
try:
print(f"URL: {url}")
print(f"Headers: {headers}")
print(f"Payload: {json.dumps(payload, indent=2)}")
response = requests.post(
url,
json=payload,
headers=headers,
timeout=60 # 60 second timeout
)
print(f"Status Code: {response.status_code}")
print(f"Response: {json.dumps(response.json(), indent=2)}")
if response.status_code == 200:
print("β
Hackathon API format test passed!")
return True
else:
print("β Hackathon API format test failed")
return False
except requests.exceptions.ConnectionError:
print("β Connection error - server might not be running")
return False
except Exception as e:
print(f"β Error: {e}")
return False
def test_simple_format():
"""Test with simple questions (no document URL)"""
print("\nπ§ͺ Testing Simple Format (No Document URL)...")
url = f"{BASE_URL}/hackrx/run"
headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer test_key_123"
}
payload = {
"questions": [
"What is covered under this policy?",
"What is the maximum coverage amount?"
]
}
try:
response = requests.post(
url,
json=payload,
headers=headers,
timeout=30
)
print(f"Status Code: {response.status_code}")
print(f"Response: {json.dumps(response.json(), indent=2)}")
if response.status_code == 200:
print("β
Simple format test passed!")
return True
else:
print("β Simple format test failed")
return False
except Exception as e:
print(f"β Error: {e}")
return False
def main():
"""Run all tests"""
print("π Testing Hackathon API Format")
print("=" * 60)
# Test simple format first
simple_ok = test_simple_format()
# Test full hackathon format
hackathon_ok = test_hackathon_format()
print("\n" + "=" * 60)
print("π TEST RESULTS")
print("=" * 60)
print(f"Simple Format: {'β
PASS' if simple_ok else 'β FAIL'}")
print(f"Hackathon Format: {'β
PASS' if hackathon_ok else 'β FAIL'}")
if hackathon_ok:
print("\nπ Your API is ready for hackathon submission!")
print(f"URL: {BASE_URL}/hackrx/run")
print("\nπ Submission Details:")
print(f"Webhook URL: {BASE_URL}/hackrx/run")
print("Method: POST")
print("Headers: Authorization: Bearer <api_key>")
print("Content-Type: application/json")
else:
print("\nβ οΈ Please fix the issues and try again.")
if __name__ == "__main__":
main() |