Spaces:
Sleeping
Sleeping
Commit History
-
✅ FIX: Enable vehicle classification + proper state handling (unknown -> actual type)
barathvasan-dev70ebdb9 -
⚡ CRITICAL: Enable GPU acceleration for YOLO inference (43s -> 2-3s on GPU)
barathvasan-dev7d1df89 -
⚡ OPTIMIZE: detector - 3x faster plate detection (single OCR, lightweight preprocessing)
barathvasan-dev084c5ef -
Fix investigation display and donut chart: use correct column names, improve results formatting
barathvasan-dev667c692 -
Fix investigation hanging: add timeout protection and simplify chat handlers
barathvasan-dev734c3b3 -
🐛 CRITICAL FIX: Convert Chatbot format from tuple to dict with role/content keys
barathvasan-dev4dcd2f3 -
Fix: Remove duplicate code, improve chatbot tuple format handling
barathvasan-devfd53ef0 -
🔧 Fix: Correct chat message format in investigation chatbot
barathvasan-devfced10e -
🎨 UI improvements: add visual charts, fix analytics dashboard, optimize investigation lag
barathvasan-dev71f10e7 -
Fix: Suppress asyncio cleanup errors and optimize detailed tabs for responsiveness
barathvasan-dev0231137 -
Optimize: Instant UI response - return immediately with loading message, fill in results in background
barathvasan-devf385408 -
Fix: Use proper Gradio Chatbot format with role/content dictionaries
barathvasan-devf0a026f -
Fix: Remove asyncio event loop policy, fix MistralClient references, simplify chat message format
barathvasan-dev01077ea -
Fix: Resolve Chatbot message format error, asyncio event loop issues, and Mistral API compatibility
barathvasan-devf9bd7d7 -
Fix: Resolve asyncio event loop issues and Mistral client API compatibility
barathvasan-dev72f433c -
Fix: Remove unsupported bubble_full_width parameter from Chatbot
barathvasan-dev7c0ff10 -
Fix: Remove unsupported show_copy_button parameter from Chatbot and remove undefined function wrappers
barathvasan-devc233c13 -
Enhancement: Production-grade AI Investigation with query caching, anomaly detection, conversation memory, and intelligent follow-ups
barathvasan-devd99ce15 -
UI Redesign: Chat-based investigation interface with conversational flow and scrollable history
barathvasan-dev16cdcbe -
Major redesign: AI Investigation agent with conversational multi-turn flow, follow-up questions, and better error handling
barathvasan-dev719ba4c -
Fix: NLP-to-SQL now handles multiple vehicles and multiple locations with proper OR logic
barathvasan-devec39753 -
Improve: Enhanced NLP-to-SQL handling for complex queries, better data analysis, and error handling
barathvasan-devae48b27 -
Fix: Improve NLP-to-SQL parsing for complex multi-condition queries
barathvasan-devImprovements: - Smart extraction layer before Mistral (faster + more reliable) - Extract vehicle types dynamically (bike, car, truck, mini_truck, auto, etc.) - Extract locations dynamically (any location, not just hardcoded list) - Support multiple vehicle types with OR logic - Support multiple locations with OR logic - Better time context extraction (midnight, morning, today, etc.) - Improved Mistral prompt for handling complex cases - All conditions joined with proper AND/OR logic - Fixed: 'show bike in kottupuram' now works - Fixed: 'show bike and mini_truck in adyar' now works - Support any combination of conditions1d03416 -
Feature: Advanced NLP-to-SQL with Mistral agent
barathvasan-devMajor improvements: - Convert natural language queries to SQL using Mistral (e.g., 'show bikes in Adyar') - Handle complex queries: multiple locations, vehicle types, time ranges, where conditions - Execute generated SQL safely with validation and error handling - Enhanced RAG with detailed data context and sample records for Mistral analysis - Better prompt engineering: send full data + question to Mistral for deep insights - Improved UI: show data execution flow with metrics structure - Display raw data in tables for transparency - Support all types of queries: bikes, cars, locations, travel history, midnight activity, etc. - Fallback analysis when Mistral unavailablecb25fea -
Improve: Redesign AI Investigation UI and output formatting
barathvasan-dev- Remove verbose instructions and example questions - Simplify UI to single question input - Add 4 output tabs: Data Collected, AI Response, Key Findings, Relevant Data - Remove ** markdown formatting from responses for cleaner output - Improve data_summary to show what data was retrieved (structure/schema) - Better key findings extraction with specific metrics - Display retrieved data in tables - Focus on NLP-based conversational answers vs SQL-like responses - Cleaner, more professional AI agent interface57c13aa -
Refactor: Consolidate AI Investigation into single unified agent tab with RAG capabilities
barathvasan-dev- Replace 4 separate investigation tabs (Vehicle, Area, Midnight, Most Suspicious) with 1 unified tab - Add ask_investigation_question() function for natural language queries with RAG - Agent now dynamically understands questions and fetches relevant database data - Users can ask any question (e.g. 'vehicles in Adyar at midnight', 'suspicious activity in industrial zones') - Mistral model acts as RAG agent to analyze data and provide intelligent answers - Add example quick-start buttons for common investigation types279c530 -
Fix: Remove unsupported show_copy_button parameter from Gradio Textbox components for compatibility
barathvasan-dev25c874b
-
Fix: Remove mistralai dependency conflict
barathvasan-devISSUE: - mistralai==0.0.11 has dependency conflicts with Gradio on HF Spaces - httpx version conflicts causing pip resolution failure SOLUTION: - Removed mistralai from requirements.txt - AI Investigation Assistant now works in FALLBACK MODE - Professional narratives generated without external AI service - All investigation features fully functional FALLBACK FEATURES: ✅ Vehicle behavior analysis and narratives ✅ Area intelligence reports ✅ Midnight activity detection ✅ Key findings extraction ✅ Actionable recommendations ✅ All data analysis and pattern detection RESULT: - HF Spaces build will succeed - Investigation tab fully operational - Seamless user experience - Future: Can add Mistral back when dependency conflicts resolved45a6314 -
Integrate: AI Investigation Assistant into new tab (replaces AI Assistant)
barathvasan-devNEW TAB: 🔍 AI Investigation Assistant (Replaced chatbot-based AI Assistant) Four investigation modes available: 1. 🚗 VEHICLE INVESTIGATION: - Analyze single vehicle behavior patterns - Detect repeated visits and suspicious timing - View location clustering and routes - Get actionable recommendations 2. 📍 AREA INTELLIGENCE: - Analyze zone-wide activity - Identify most suspicious vehicles in area - Find peak activity times - Security recommendations 3. 🌙 MIDNIGHT ACTIVITY: - Find late-night suspicious movements - Analyze midnight vehicle patterns - Identify industrial zone activity - Tactical deployment recommendations 4. ⚠️ MOST SUSPICIOUS TODAY: - Auto-find highest-risk vehicle today - Instant investigation report - Alert-level findings OUTPUT FOR EACH INVESTIGATION: - 📋 Investigation Narrative (professional summary) - 🚨 Key Findings (critical patterns) - 📊 Detailed Analysis (metrics & statistics) - ✅ Recommendations (actionable…1cdb670 -
Add: AI Investigation Assistant module
barathvasan-devNEW FEATURE: Professional surveillance analyst AI system RAG System (Retrieval-Augmented Generation): 1. Collects detection data from database 2. Analyzes behavior patterns 3. Generates intelligence narratives using Mistral AI 4. Provides actionable recommendations INVESTIGATIONS SUPPORTED: 1. VEHICLE INVESTIGATION: - Detects repeated visits, timing patterns - Analyzes location clustering and route frequency - Identifies midnight/suspicious activity - Returns confidence scores and behavior analysis 2. AREA INTELLIGENCE: - Analyzes zone-wide vehicle activity - Identifies repeated vehicles - Notes peak activity times - Highlights suspicious zones 3. MIDNIGHT ACTIVITY ANALYSIS: - Finds late-night suspicious movements - Identifies vehicles active during night hours - Analyzes industrial zone patterns - Flags repeat offenders 4. TODAY'S MOST SUSPICIOUS: - Automatically identifies most suspicious vehicle - Reports detection frequency and patter…6886d9c -
Fix: Precise location coordinates and single marker per location
barathvasan-devMAJOR FIXES: 1. Updated LOCATION_COORDINATES with exact locations: - Adyar_GandhiNagar, Adyar_IndiraNagar, Adyar_KasturibaiNagar - AnnaNagar_2ndAvenue, AnnaNagar_Roundtana - Guindy_GSTRoad, Kotturpuram_AnnaUniversity, Koyambedu_Market - Mylapore_Temple, Nungambakkam_HighRoad, Thiruvanmiyur_Junction - Tnagar_PondyBazaar, Tnagar_UsmanRoad, Velachery_MainRoad 2. Fixed get_coordinates() - now does exact match first, then partial match 3. VISUALIZATION LOGIC: MODE 1 (No date filter): - ONE marker per location (blue) - Popup shows all dates visited with color-coded date summary MODE 2 (With date filter): - ONE marker per location (color = first date in range) - Popup shows: * Date summary with detection count per date * All timestamps with confidence scores * Color-coded dates in legend 4. Better popup formatting: - Date summaries with color-coded borders - Timestamp details with confidence values - Improved layout and readability …2f92b87 -
Fix: Replace gr.Date with gr.Textbox for Gradio compatibility
barathvasan-devChanged date input fields from gr.Date (not available in HF Spaces Gradio version) to gr.Textbox with YYYY-MM-DD format. FIXES: - Replaced gr.Date components with gr.Textbox - Added YYYY-MM-DD format placeholder and info text - Existing date parsing in vehicle_map.py handles string dates correctly - Empty strings treated as None by falsy check in vehicle_map.py The date_from and date_to fields now accept text input in YYYY-MM-DD format or can be left empty to search all dates.630f1b6 -
Redesign: Professional vehicle route visualization - smart marker grouping
barathvasan-devNO ROUTE LINES - Clean professional design MODE 1 - NO DATE FILTER (Plate search only): - Single marker per unique location (aggregates all records) - Click marker to see all dates visited at that location - Popup shows: dates, times, detection counts, vehicle details - Blue markers for all locations MODE 2 - WITH DATE FILTER (Date range selected): - Marker for EACH location-date combination - Color-coded by DATE (different color for each date) - Click marker to see all detections on that date at that location - Professional color palette for up to 10 different dates PROFESSIONAL FEATURES: - No start/end flags - cleaner design - Improved popup styling (CSS formatting) - Better information hierarchy - Grouped timeline information - Color-coded date ranges in popups - Responsive popup max widths - Professional font and spacing EXAMPLES: - Search TN478278 (no date) -> shows all 100 records as single markers per location - Search TN478278 with date range 18/07/2026 to 19/07/2026 -> dif…a7cda55 -
Enhance: Vehicle Intelligence Map with smart location grouping and date colors
barathvasan-devIMPROVEMENTS: - Added color palette: different colors for different dates (10 colors) - Smart marker grouping: same location with different dates = BLACK marker - Location grouping: single date = colored marker per date - No lines between same locations on different dates (cleaner map) - Routes drawn only within same date (colored by date) UI ENHANCEMENTS: - Replaced textbox date inputs with gr.Date() calendar pickers - Better labels and info text for date fields - Improved button label and layout - Better table/JSON labels FEATURES: - Single plate search: shows all dates with different colors - Date range search: marks all dates in range with color coding - Grouped location popups: shows all dates/detections at same location - Start/End markers with flag icons and timestamps - Analytics now includes unique date count BUGFIXES: - Handle date object conversion from Gradio Date picker - Proper SQL date filtering3deba18 -
Fix: Database column names in vehicle route search - Vehicle Intelligence Map
barathvasan-dev- Changed 'confidence' to 'vehicle_conf' (correct schema column) - Changed 'detection_date' to 'date' (correct schema column) - Changed 'detection_time' to 'timestamp' (correct schema column) - Updated WHERE clause date filter to use 'date' column - Updated ORDER BY to use correct column names - Updated popup display to use correct column names - Resolves: psycopg2.errors.UndefinedColumn - column confidence does not existd16b0a9 -
Clean up: Remove duplicate functions and add map_to_html - Vehicle Intelligence Map
barathvasan-dev- Fixed TAB 5 indentation in demo context - Added map_to_html function to vehicle_map.py - Removed duplicate functions from app.py (search_vehicle_route, radius_surveillance, show_heatmap, show_suspicious, get_map_dashboard) - These now use the working implementation from vehicle_map.py - Added engine import to vehicle_map.py from database - All imports properly alignedce822b4 -
Fix: TAB 5 context manager indentation error - Vehicle Intelligence Map
barathvasan-dev- Fixed TAB 5 indentation - moved inside demo context properly - Was at root level, causing context manager error - All Tab components now properly nested within demo = gr.Blocks() context - Resolves AttributeError: 'Textbox' object has no attribute 'page'5fa73f8 -
Fix: Gradio context manager error in TAB 5 - Vehicle Intelligence
barathvasan-dev- Fixed AttributeError: 'Textbox' object has no attribute 'page' - Moved search_vehicle_btn into first Row context - Wrapped vehicle_table and vehicle_info in second Row context - Ensures all components are properly nested within layout containers - Proper indentation and Gradio context hierarchybcd22d0 -
Fix: TAB 5 indentation and imports - Vehicle Intelligence Map
barathvasan-dev- Fixed imports in app.py to match actual vehicle_map.py functions - Removed non-existent function imports - Imported: search_vehicle_route, default_vehicle_map, map_to_html - Updated vehicle_map.py with enhanced route tracking and analytics - All required packages (folium, branca, pandas, sqlalchemy) verified in requirements.txt3c3ad7c
-
Fix: Complete Vehicle Intelligence Map overhaul - Removed duplicates, fixed Folium HTML rendering with branca, added plate normalization, handle NaN coordinates, proper error handling, dark map theme
barathvasan-deva7e10c9 -
Fix: Remove invalid 'enable_queue' parameter from demo.launch()
barathvasan-dev012ce4b -
Fix: Asyncio event loop cleanup issue - Added platform-specific event loop policy, disabled SSR mode, suppressed warnings
barathvasan-dev93f8de0 -
Fix: Vehicle Intelligence Map - Fixed map HTML display, added location geocoding, improved error handling, working with database schema
barathvasan-dev975a0b9 -
Add: Vehicle Intelligence Map - geospatial tracking, route visualization, radius surveillance, heatmaps, suspicious movement detection
barathvasan-devd497a90 -
Fix: Remove unsupported 'show_copy_button' parameter from gr.Chatbot()
barathvasan-deve9d02f4 -
Fix: Remove invalid 'interactive' parameter from gr.Markdown() components
barathvasan-dev3b72a1f -
Update app.py
barathvasan-dev5b46e11
-
Fix: Parse HF Space detection response format correctly - handle single detection object not array
barathvasan-devf9c9a7c -
Switch to HuggingFace Space for detection - Use remote YOLO/OCR models instead of local
barathvasan-devb94291c -
Fix: Install missing packages (ultralytics, paddleocr, torchvision) in conda env - Detection now working
barathvasan-deva0ba8c9