Spaces:
Sleeping
Sleeping
File size: 7,238 Bytes
622b3c4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | ---
title: Talk2map
emoji: ๐
colorFrom: yellow
colorTo: indigo
sdk: docker
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
# Talk2Map ๐บ๏ธ๐ค
**Talk2Map** is a conversational microservice that lets you ask about places naturally.
It returns **location details, coordinates, bounding box**, and maintains a **conversation history** for smooth human-like interactions.
---
## โจ Features
* Natural language queries (e.g., *โbest hotel in Chennaiโ*)
* Returns **place details**: name, address, latitude & longitude
* Returns **bounding box (square coordinates)** of a location/building
* Maintains **conversation history** with human/AI messages
* Provides both structured data + natural **agent reply**
* REST API microservice (Python FastAPI / Node Express ready)
---
## ๐ก API Usage
### Request
Send your query with **conversation history**:
```json
{
"user_input": "best 2 hotel in chennai",
"conversation_history": [
{
"human": "hello",
"ai": "hello sir"
}
]
}
```
---
### Response
Talk2Map replies with both **natural text** and updated **conversation history**:
```json
{
"agent_reply": "The best hotel I found in Chennai is Taj Coromandel, located at 37 Mahatma Gandhi Road, Nungambakkam. Its coordinates are latitude 13.061 and longitude 80.251.",
"conversation_history": [
{
"human": "hello",
"ai": "hello sir"
},
{
"human": "best hotel in Chennai",
"ai": "The best hotel I found in Chennai is Taj Coromandel, located at 37 Mahatma Gandhi Road, Nungambakkam. Its coordinates are latitude 13.061 and longitude 80.251."
}
]
}
```
---
### Extended Response with Location Data
Optionally, you can also include **location details** + **bounding box** in the response:
```json
{
"agent_reply": {
"message": "1. ITC Grand Chola, a Luxury Collection Hotel, Chennai โ 63, Mount Rd, Little Mount, Guindy, Chennai, Tamil Nadu 600032 (4.7 โ
, 41868 Reviews, Maps URL)\nlat,lng: 13.010613, 80.2206015\nSW: (13.009167, 80.219515), NE: (13.011865, 80.222213)\n\n2. The Leela Palace Chennai - Seaside Modern Palace Hotel โ Adyar Sea Face, Leela Palace Rd, MRC Nagar, Raja Annamalai Puram, Chennai, Tamil Nadu 600028 (4.6 โ
, 15413 Reviews, Maps URL)\nlat,lng: 13.017048, 80.2736566\nSW: (13.016065, 80.271977), NE: (13.018762, 80.274675)",
"places": [
{
"name": "ITC Grand Chola, a Luxury Collection Hotel, Chennai",
"address": "63, Mount Rd, Little Mount, Guindy, Chennai, Tamil Nadu 600032",
"latitude": 13.010613,
"longitude": 80.2206015,
"bounding_box": {
"north_east": {
"lat": 13.011865130291502,
"lon": 80.2222132802915
},
"south_west": {
"lat": 13.009167169708498,
"lon": 80.21951531970849
}
},
"rating": 4.7,
"user_rating_count": 41868,
"maps_url": "https://maps.google.com/?cid=17494736093121177155&g_mp=Cidnb29nbGUubWFwcy5wbGFjZXMudjEuUGxhY2VzLlNlYXJjaFRleHQQABgEIAA"
},
{
"name": "The Leela Palace Chennai - Seaside Modern Palace Hotel",
"address": "Adyar Sea Face, Leela Palace Rd, MRC Nagar, Raja Annamalai Puram, Chennai, Tamil Nadu 600028",
"latitude": 13.017048,
"longitude": 80.2736566,
"bounding_box": {
"north_east": {
"lat": 13.018762480291501,
"lon": 80.2746746802915
},
"south_west": {
"lat": 13.016064519708497,
"lon": 80.27197671970849
}
},
"rating": 4.6,
"user_rating_count": 15413,
"maps_url": "https://maps.google.com/?cid=7374804035710576015&g_mp=Cidnb29nbGUubWFwcy5wbGFjZXMudjEuUGxhY2VzLlNlYXJjaFRleHQQABgEIAA"
}
]
},
"conversation_history": [
{
"human": "hello",
"ai": "hello sir"
},
{
"human": "best 2 hotel in chennai",
"ai": {
"message": "1. ITC Grand Chola, a Luxury Collection Hotel, Chennai โ 63, Mount Rd, Little Mount, Guindy, Chennai, Tamil Nadu 600032 (4.7 โ
, 41868 Reviews, Maps URL)\nlat,lng: 13.010613, 80.2206015\nSW: (13.009167, 80.219515), NE: (13.011865, 80.222213)\n\n2. The Leela Palace Chennai - Seaside Modern Palace Hotel โ Adyar Sea Face, Leela Palace Rd, MRC Nagar, Raja Annamalai Puram, Chennai, Tamil Nadu 600028 (4.6 โ
, 15413 Reviews, Maps URL)\nlat,lng: 13.017048, 80.2736566\nSW: (13.016065, 80.271977), NE: (13.018762, 80.274675)",
"places": [
{
"name": "ITC Grand Chola, a Luxury Collection Hotel, Chennai",
"address": "63, Mount Rd, Little Mount, Guindy, Chennai, Tamil Nadu 600032",
"latitude": 13.010613,
"longitude": 80.2206015,
"bounding_box": {
"north_east": {
"lat": 13.011865130291502,
"lon": 80.2222132802915
},
"south_west": {
"lat": 13.009167169708498,
"lon": 80.21951531970849
}
},
"rating": 4.7,
"user_rating_count": 41868,
"maps_url": "https://maps.google.com/?cid=17494736093121177155&g_mp=Cidnb29nbGUubWFwcy5wbGFjZXMudjEuUGxhY2VzLlNlYXJjaFRleHQQABgEIAA"
},
{
"name": "The Leela Palace Chennai - Seaside Modern Palace Hotel",
"address": "Adyar Sea Face, Leela Palace Rd, MRC Nagar, Raja Annamalai Puram, Chennai, Tamil Nadu 600028",
"latitude": 13.017048,
"longitude": 80.2736566,
"bounding_box": {
"north_east": {
"lat": 13.018762480291501,
"lon": 80.2746746802915
},
"south_west": {
"lat": 13.016064519708497,
"lon": 80.27197671970849
}
},
"rating": 4.6,
"user_rating_count": 15413,
"maps_url": "https://maps.google.com/?cid=7374804035710576015&g_mp=Cidnb29nbGUubWFwcy5wbGFjZXMudjEuUGxhY2VzLlNlYXJjaFRleHQQABgEIAA"
}
]
}
}
]
}
```
---
## ๐ Tech Stack
* **Python + FastAPI**
* **Geocoding APIs** (Google Maps)
|