Spaces:
Runtime error
Runtime error
Commit History
-
Fix index
f36d1f9
-
Fix AI-enhanced search with comprehensive external source integration
- Enhanced query expansion for better semantic matching (mistral↔mixtral, transformer↔attention) - Fixed external search integration with proper timeout handling for GitHub and web search - Improved error handling and TypeScript compatibility for external search results - Knowledge base documents now get highest priority (relevance boost +0.6) - Added support for parallel GitHub and web search with 8s/5s timeouts respectively - Vector search functionality preserved and working correctly with Modal FAISS index 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>cd55914 -
Fix ai search
e782c0f -
Tweak vector search
1a1b3eb -
fix mistral ai
a5766c9 -
generate embeddings
c55df02 -
add route
b5baf9e -
Fix nebius AI
24425b1 -
Fix indexing issue
a8d30b4 -
Add clickable link for vector search results
c79a43d -
update index
07b8ac9 -
Add seed documents to begin with
742d179 -
Update system flow and add default research papers for demo
✨ System Flow Updates: - Updated flow to include document upload and processing pipeline - Added vector index building and hybrid search steps - Integrated Modal distributed computing and Nebius AI - Enhanced with knowledge graph visualization - Updated technology stack references 🌱 Default Documents Seeding: - Added 7 important AI research papers for demo purposes - Includes: Attention Is All You Need, GPT-4, Constitutional AI, RAG, LangChain, RLHF, Emergent Abilities - Automatic seeding on first startup for populated knowledge graph - Papers include full abstracts, metadata, and author information - Enables immediate demo without requiring uploads 🎯 Demo Improvements: - Knowledge graph now populated by default in all environments - System flow reflects actual implemented functionality - Ready for hackathon demonstration with rich content 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>e57738d -
Fix Modal vector index building and storage
- Update Modal app to use remote function calls for proper volume access - Add fallback storage paths for Modal functions (/storage, /tmp, .) - Fix Modal client request format to match API expectations - Remove authentication from Modal API requests - Add comprehensive error handling and debug logging - Deploy Modal app with corrected storage configuration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>4e2a9bc -
Add Hugging Face Spaces configuration and documentation
- Add HF_SPACES_SETUP.md with comprehensive setup guide - Add .env.hf-spaces with HF-specific environment configuration - Update .env.example with upload configuration - Document storage options and troubleshooting steps 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>c4f2ce6 -
Fix upload functionality for Hugging Face Spaces
- Force enable uploads for HF Spaces environment detection - Fix document processing validation schema - Add better environment debugging - Exclude uploads/ and data/ directories from git tracking - Make Vite errors non-fatal to prevent server crashes 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>741fd46 -
Fix vector index
db97c61 -
Fix file upload
353a9b9 -
Fix Hugging Face Spaces deployment: Handle file permissions and production environment
🔧 Production File Permissions: - Use /tmp directory for uploads and database in production (NODE_ENV=production) - Add error handling for mkdir operations that fail due to permissions - Graceful fallback when directory creation fails 🚀 Hugging Face Spaces Compatibility: - Detect production environment and use writable /tmp paths - Added ENABLE_UPLOADS environment variable to control file upload functionality - Fallback routes for disabled uploads with helpful error messages 💾 Database & Storage Fixes: - SQLite database path: /tmp/knowledgebridge.db in production - Upload directory: /tmp/uploads in production vs ./uploads in development - Error handling for permission denied scenarios 🎯 Graceful Degradation: - App continues to work even when file operations fail - Clear error messages explaining disabled functionality - Traditional search and external sources still available 🔒 Environment Detection: - Automatic detection of production vs development environment - Optional ENABL…ccf1a85 -
Add comprehensive service breakdown: Nebius AI vs Modal.com usage
✅ Clear Service Division: - Nebius AI: 'The Brain' - Language intelligence, AI reasoning, content analysis - Modal.com: 'The Engine' - Heavy computation, OCR, vector operations, batch processing ✅ Specific Use Cases: - Document analysis, query enhancement, research synthesis → Nebius AI - OCR processing, FAISS indexing, distributed computing → Modal.com ✅ Integration Workflows: - Step-by-step document processing pipeline showing which service handles each step - Search workflow demonstrating coordinated service usage ✅ Feature Comparison Table: - Clear checkmarks showing exactly which service handles which operations - Notes on overlapping areas (embeddings: real-time vs batch) ✅ Specific API Endpoints: - Listed exact endpoints that use each service - Removed confusion about service responsibilities This section provides crystal clear understanding of why both services are needed and how they complement each other in the architecture.484ea5f -
Update README.md to reflect new production capabilities and remove duplicates
✅ Updated Core Description: - Changed from theoretical to production-ready document processing system - Highlighted real OCR, vector search, and distributed computing capabilities ✅ Revised Architecture Documentation: - Removed duplicate information between sections - Focused on actual implementation vs. theoretical features - Clear separation between Nebius AI (language intelligence) and Modal (heavy computation) ✅ Updated Usage Guide: - Document upload and processing workflows - Vector search capabilities with performance comparison - Real-world batch processing operations ✅ Comprehensive API Reference: - Document management endpoints (/api/documents/*) - Vector search and indexing operations - Removed outdated theoretical endpoints ✅ Performance Metrics: - Real-world timings for OCR, vector search, index building - Production scalability with actual resource allocation - Concrete performance benchmarks ✅ Latest Features Section: - Replaced outdated "recent updates" with current…c96d7dc -
Implement complete document upload and processing pipeline with Modal integration
✅ Real Document Upload: - Created SQLite storage replacing in-memory storage with full document metadata - Added file upload API with multer supporting PDFs, images, text files (50MB limit) - Implemented document processing pipeline with Modal integration for heavy workloads ✅ PDF/Image Processing Pipeline: - Modal integration for OCR text extraction using PyPDF2 and Tesseract - Batch processing capabilities for multiple documents concurrently - Document status tracking (pending -> processing -> completed/failed) ✅ Vector Embeddings Storage & Search: - Real embeddings generation using Nebius AI and storage in SQLite - Vector index building using Modal's FAISS implementation - High-performance vector search with relevance scoring ✅ Database Storage: - SQLite storage with proper schema for file metadata, processing status - Document lifecycle management with file path tracking - Search history and results persistence ✅ Batch Processing: - Modal distributed computing for processing la…10ac46e -
Comprehensive update: Modal.com and Nebius AI integration documentation
- Add detailed explanation of Modal.com purpose: distributed serverless computing for heavy AI workloads - Document Nebius AI role: advanced language intelligence and embedding generation - Include specific Modal endpoints and their functions (OCR, FAISS, batch processing) - Add integrated workflow architecture showing how both services work together - Update API reference with Modal integration endpoints - Include performance metrics for both platforms with realistic response times - Add failover strategies and graceful degradation capabilities - Include live Modal app links for testing and documentation - Document resource allocation (2-4GB memory, CPU scaling for Modal functions) - Add comprehensive service architecture explanation with clear separation of concerns39781c3 -
Fix Modal app FastAPI integration and successful deployment
- Replace @modal.fastapi_endpoint() with @modal.asgi_app() for proper FastAPI integration - Use .local() calls instead of .remote.aio() to avoid recursion issues - Fix circular reference errors in JSON serialization - Update datetime.utcnow() to datetime.now(timezone.utc) for deprecation warning - Simplify task status endpoint to avoid recursion - Successfully deployed at: https://fazeelusmani18--knowledgebridge-main-fastapi-app.modal.run - Verified endpoints working: /health, /docs, /vector-search with proper error responses8140962 -
Fix Modal app: Move imports inside functions
- Moved all package imports inside Modal functions to avoid local import errors - Fixed hash function usage with hashlib.md5 - Fixed timestamp generation for health check - Ready for deployment907a3ac -
Add complete Modal app for distributed computing
Created Modal app with: - Text extraction (OCR, PDF parsing) - Vector indexing with FAISS - High-performance vector search - Batch document processing - Task status tracking - Web endpoints for all functions Updated configuration to use new Modal endpoint. Ready for deployment with 'modal deploy main.py'f70a5f4 -
Add detailed Modal usage logging for debugging
- Added console logs to track Modal vector search attempts - Shows when Modal is being called vs falling back to local search - Helps debug why Modal credits aren't being consumed - Better error handling and status reporting7e9dcae -
Improve result card: Remove empty additional context, enhance metadata
1. Remove 'Additional Context' section when empty (no more 'No additional context available') 2. Enhanced metadata display for academic papers: - Renamed to 'Publication Details' for academic papers - Authors prominently displayed with highlight background - Added emojis for better visual hierarchy (👥 Authors, 📅 Year, 🏛️ Venue, etc.) - Source-specific metadata (⭐ Stars for GitHub repos) - Better spacing and typography Much cleaner and more informative interface\!159f7bb -
Fix JSX syntax error in result card component
Fixed incomplete conditional expression after removing duplicate content section. Added fallback message for missing additional context.62ff453 -
Fix content truncation: Show full content instead of snippet
- Changed snippet preview to show full content with search highlighting - Added expandable preview with gradient fade for long content - Removed duplicate 'Full Content' section in expanded view - Users now see complete content immediately, not truncated snippets - Maintains clean UI with max-height and scroll for very long contentcdc4bc7 -
Make full content scrollable instead of truncated
- Replaced truncated content with full scrollable view - Added max-height (384px) with overflow-y-auto for long content - Better UX for knowledge base - users can read complete documents - Maintains clean layout while providing full access to content0e28fdd -
Remove hardcoded Replit banner script from HTML
The Replit dev banner script was hardcoded in index.html causing CSP violations in production. Removed it completely as it's not needed for Hugging Face Spaces deployment.602fcb0 -
Remove Replit plugins from production build
- Restrict Replit plugins to development + REPL_ID environment only - This prevents Replit banner scripts from loading in production - Fixes CSP violations for replit.com scripts in HF Spaces - Keeps clean production builds without dev dependencies7127914 -
Fix CSP frame-ancestors for Hugging Face Spaces
Allow the app to be framed by Hugging Face domains in production to prevent CSP violations. This resolves the frame-ancestors error in the browser console.8a11413 -
Add explicit root route and fix SPA fallback
- Added explicit / route to serve index.html directly - Fixed SPA fallback to not intercept API routes - Should resolve connection issues with the frontend76dbde8 -
Fix health check to prevent restart loop
Add missing API key guard for Nebius Chat Completions check. Now all services properly return 'missing_key' instead of 'error' when API keys are not configured, preventing Docker health probe failures and container restart loops.e1974ad -
Add ping endpoint for server health verification
Added /ping endpoint to ensure server is responsive and help debug connection issues. This provides a simple endpoint to verify the server is running properly.7841477 -
Remove backup route blocking React app
The backup root route was interfering with static file serving. Now the proper SPA routing can handle the root path and serve the React application correctly.30f57ca -
Fix Space issues: Remove blocking route and fix health check
1. Remove emergency route that was blocking React app from loading 2. Fix health check to tolerate missing API keys (missing_key \!= error) - Now returns 200 unless there's a real API error - Space will show as healthy even without all API keys configured This should make the Space show the actual React UI and remove the 'may have issues' warning banner.951fb3f -
Implement proper rate limiting for HF Spaces proxy environment
Instead of disabling rate limiting, configure it properly for Hugging Face Spaces: - Higher limits due to shared proxy infrastructure - Custom key generator using multiple headers - Skip validation to avoid proxy configuration errors - Maintain security while working with HF infrastructuredd22d79 -
Disable rate limiting in production for HF Spaces
Rate limiting causes issues in Hugging Face Spaces proxy environment. Disable for production while keeping it active for local development.0e0c0a2 -
Fix Express trust proxy for Hugging Face Spaces
Enable trust proxy in production to properly handle X-Forwarded-For headers from HF Spaces infrastructure and fix rate limiting.999687d -
Fix port configuration for Hugging Face Spaces
Use port 7860 in production environment to match HF Spaces expectations. Local development still uses port 5000.af2dad0 -
DEFINITIVE FIX: Resolve Docker build issues for Hugging Face Spaces
Root cause: .gitignore was excluding client/src/lib/ directory with overly broad "lib/" pattern meant for Python packages. Solution: 1. Fixed .gitignore to specifically exclude Python lib dirs only 2. Added .dockerignore with explicit inclusion of client/src/lib 3. Reverted import to clean @/lib/queryClient format 4. Ensured robust file copying for containerized environments This addresses all Docker/container path resolution issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>b65e9ca -
Add .ts extension to queryClient import for Docker compatibility
The Docker build environment requires explicit .ts extension for the path alias resolution to work correctly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>f61cf0b -
Fix Docker build by using path alias for queryClient import
Changed import from "./lib/queryClient" to "@/lib/queryClient" to use the configured path alias which resolves correctly in the Docker build environment. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>3df58dc -
Update readme.md
f5556f2 -
Fix dockerfile
44f76b8 -
initial commit
7c012de -
initial commit
bfbe43b