Skip to content

Commit

Permalink
search
Browse files Browse the repository at this point in the history
  • Loading branch information
truskovskiyk committed Dec 25, 2024
1 parent 17f3fd9 commit 28d0526
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions no-ocr-api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Settings(BaseSettings):
STORAGE_DIR: str = "storage"
COLLECTION_INFO_FILENAME: str = "collection_info.json"
HF_DATASET_DIRNAME: str = "hf_dataset"
SEARCH_TOP_K: int = 5
SEARCH_TOP_K: int = 3
COLPALI_TOKEN: str = "super-secret-token"
VLLM_URL: str = "https://truskovskiyk--qwen2-vllm-serve.modal.run/v1/"
COLPALI_BASE_URL: str = "https://truskovskiyk--colpali-embedding-serve.modal.run"
Expand All @@ -50,7 +50,7 @@ class Settings(BaseSettings):
VECTOR_SIZE: int = 128
INDEXING_THRESHOLD: int = 100
QUANTILE: float = 0.99
TOP_K: int = 3
TOP_K: int = 5
QDRANT_HTTPS: bool = True

class Config:
Expand Down
3 changes: 3 additions & 0 deletions no-ocr-ui/src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ export default function Search() {
if (!selectedCollection || !searchQuery) return;

setIsSearching(true);
setResults([]); // Clear old results
setAnswers({}); // Clear old answers

try {
const response = await fetch(`${noOcrApiUrl}/search`, {
method: 'POST',
Expand Down

0 comments on commit 28d0526

Please sign in to comment.