A web application for searching San Francisco Street View images using semantic search powered by Cohere embeddings and Pinecone vector database.
SearchUS/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API endpoints
│ │ ├── services/ # Business logic
│ │ └── utils/ # Utility functions
│ └── requirements.txt
├── frontend/ # Next.js frontend
│ ├── app/ # Next.js App Router pages
│ ├── components/ # React components
│ ├── lib/ # API client
│ ├── types/ # TypeScript types
│ └── utils/ # Utility functions
├── embed/ # Embedding pipeline (existing)
└── GoogleScraper/ # Street View scraper (existing)
- Text Search: Search Street View images using natural language queries
- Image Search: Upload an image to find similar Street View images
- Interactive Results: View results with similarity scores and metadata
- Google Maps Integration: Direct links to locations and Street View
- Responsive Design: Works on desktop and mobile devices
- Navigate to backend directory:
cd backend- Create virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env and add your API keys- Run the backend:
uvicorn app.main:app --reload --port 8000The API will be available at http://localhost:8000
- Navigate to frontend directory:
cd frontend- Install dependencies:
bun install- Set up environment variables:
cp .env.local.example .env.local
# Edit .env.local and configure API URL- Run the frontend:
bun run devThe app will be available at http://localhost:3000
COHERE_API_KEY: Your Cohere API keyPINECONE_API_KEY: Your Pinecone API key
NEXT_PUBLIC_API_URL: Backend API URL (default: http://localhost:8000)NEXT_PUBLIC_GOOGLE_MAPS_API_KEY: (Optional) Google Maps API key for embedded maps
Search by text query.
Request:
{
"query": "urban street scene",
"top_k": 10
}Response:
{
"results": [...],
"query_type": "text",
"total_results": 10
}Search by image upload.
Request: multipart/form-data
file: Image filetop_k: Number of results (optional, default: 10)
Response:
{
"results": [...],
"query_type": "image",
"total_results": 10
}cd backend
uvicorn app.main:app --reload --port 8000cd frontend
npm run devMIT