Generate an optimal path on a map a la Traveling Salesman Problem to hit different landmarks in an input city using Cloudflare Workers AI (using LlaMA-3.1), LangChain (for prompt templates and comma separated list output parser), Mapbox to create a map and get information about cities and landmarks in those cities, and Folium to edit the map.
- Enter a city🏙️ you wish to visit -> get a few must-visit landmarks in your chosen city
- Pick the landmarks🌁🗽 you want to visit.
- Generate the shortest path between these landmarks.
- Explore! 🗺️
You'll need
- a Mapbox access token--get it here
- your Cloudflare Account ID (the number/character sequence following https://dash.cloudflare.com/ when you login)
- a Cloudflare Workers AI API key (in your Cloudflare account dashboard, click AI on the lefthand side under R2, then Use REST API, then Create a Workers AI API token)
Download the requirements.txt
and run pip install
. Some main libraries this app uses includes LangChain, markdown, pandas, geopy, requests, streamlit, streamlit_searchbox, folium, typing, uuid, streamlit_folium, and folium.plugins (among others.)
Run on the command line with streamlit run app.py
.