Logo Lanfrica

wilson69-root/PLP-FINAL-PROJECT_jijipal

Domain:

mobility

Record type:

software
Creator:
wil
Host:
A bot that helps you navigating major cities in Kenya Aligning with SDG11. # MtaaAgentProject A comprehensive Kenyan city survival assistant that helps users navigate, survive, explore, and relocate in Kenyan cities through intelligent data scraping, AI-powered recommendations, and personalized itinerary generation. ## πŸ—οΈ Project Structure ``` MtaaAgentProject/ β”œβ”€β”€ agent/ β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ scraper.py # All web scraping logic β”‚ β”œβ”€β”€ prompt_templates.py # Prompt templates for HuggingFace model β”‚ β”œβ”€β”€ agent_runner.py # Core class running agent tasks β”‚ β”œβ”€β”€ cache.py # Caching scraped results (diskcache) β”‚ β”œβ”€β”€ itinerary.py # Itinerary generation logic β”‚ └── [existing files...] # Other existing agent files β”‚ β”œβ”€β”€ models/ β”‚ └── hf_model.py # HuggingFace transformer interface β”‚ β”œβ”€β”€ ui/ β”‚ β”œβ”€β”€ style.css # Custom Streamlit styling β”‚ └── components.py # Shared UI components (cards, loaders) β”‚ β”œβ”€β”€ cache/ # Auto-generated cache directory β”œβ”€β”€ main.py # Main Streamlit entry point β”œβ”€β”€ example_usage.py # Example usage demonstration β”œβ”€β”€ requirements.txt # Dependencies └── README.md # This file ``` ## πŸš€ Quick Start 1. **Install Dependencies** ```bash pip install -r requirements.txt ``` 2. **Run the Streamlit App** ```bash streamlit run main.py ``` 3. **Try the Example Script** ```bash python example_usage.py ``` ## 🧩 Key Components ### AgentTaskRunner The core orchestrator class that coordinates all agent functionality: ```python from agent.agent_runner import AgentTaskRunner runner = AgentTaskRunner(city="Nairobi", budget=50000, goal="Survive") results = runner.run_all_tasks() ``` ### HuggingFace Model Interface AI-powered responses using transformer models: ```python from models.hf_model import ask_model response = ask_model("What are good areas to live in Nairobi?") ``` ### Smart Caching Persistent caching for scraped data: ```python from agent.cache …