🔥 Inspiration The increasing number of public safety issues and lack of accessible communication channels inspired us to build a solution that empowers citizens to instantly report hazards and receive timely alerts. We envisioned a lightweight, user-friendly assistant that bridges the gap between authorities and the public—available right from a familiar platform: Telegram.
🚀 What it does . IndySafetyAssist is a smart Telegram bot that: . Allows users to report local hazards by sharing their location, description, and urgency and all necassary deatils using /report_hazard command. . Automatically classifies the type of hazard using a trained ML model. . Notifies users with real-time safety alerts based on their location,which they had set using /set_location command. . Enables users to track the status of their reports and view detailed updates using /my_reports command. . Provides a two-way communication channel between users and authorities/admins. . Admin can update the report status and can send targetted alerts using our secure Admin Api endpoint. . User can ask questions about emergency situation and our bot can answer for it using our knowledge base with simple NLU model.
🛠️ How we built it
. Frontend: Telegram Bot using python-telegram-bot. . Backend: Flask API hosted on Google Colab for ML classification and MongoDB Atlas for storing reports, alerts, and user data. . ML Model: A trained classifier to predict the type of hazard based on description.
Features Integrated:
. Inline buttons for interaction (View Report, Back, etc.). . MongoDB for persistent storage. . Location-based filtering for alerts. . Admin endpoints for updating statuses and sending alerts.
🧗 Challenges we ran into
. Handling dynamic inline keyboard interactions reliably. . Managing the flow of user inputs and maintaining state across multiple steps in Telegram. . Ensuring accurate hazard classification using a limited dataset. . Implementing real-time, location-aware alert distribution. . Debugging Telegram callbacks, especially inline button updates and message edits. . Integrating ML model to the python bot code.
🏆 Accomplishments that we're proud of
. Created a fully functional bot that simulates a real-world public safety assistant. . Implemented ML-based hazard classification and integrated it into the reporting flow. . Achieved smooth multi-step user input collection with error handling. . Built a working prototype that supports both citizen and admin use cases.
📚 What we learned
. Advanced usage of the python-telegram-bot library for handling conversations and inline callbacks. . Integration of ML models into real-time applications using Flask APIs. . MongoDB document structuring for scalable user and report data. . Designing intuitive user flows for bots on mobile chat platforms.
🚧 What's next for IndySafetyAssist_bot
. Add photo-based classification using computer vision models. . Implement voice-enabled reporting for accessibility. . Create an admin dashboard to visualize reports and alerts geographically. . Add community voting to validate reports and reduce spam. . Integrate emergency contact routing and notifications to nearby services.
Built With
- colab
- dnspython
- flask
- machine-learning
- mongodb
- ngrok
- nlu
- numpy
- pandas
- postman
- python
- python-telegram-bot
- scikit-learn
- sentence-transformer
- telegram-api
- webhook
Log in or sign up for Devpost to join the conversation.