Spaces:
Running
Running
Update services/location_service.py
Browse files
services/location_service.py
CHANGED
@@ -5,6 +5,7 @@ from geopy.exc import GeocoderTimedOut, GeocoderUnavailable
|
|
5 |
from models.location_models import LocationData, Coordinates, ErrorResponse
|
6 |
|
7 |
class LocationService:
|
|
|
8 |
@staticmethod
|
9 |
def extract_location_entities(ner_results):
|
10 |
city, state, country = None, None, None
|
@@ -26,7 +27,7 @@ class LocationService:
|
|
26 |
|
27 |
|
28 |
@staticmethod
|
29 |
-
def get_coordinates(data:dict
|
30 |
print("Inside get coordinates")
|
31 |
print(data)
|
32 |
try:
|
|
|
5 |
from models.location_models import LocationData, Coordinates, ErrorResponse
|
6 |
|
7 |
class LocationService:
|
8 |
+
app = FastAPI()
|
9 |
@staticmethod
|
10 |
def extract_location_entities(ner_results):
|
11 |
city, state, country = None, None, None
|
|
|
27 |
|
28 |
|
29 |
@staticmethod
|
30 |
+
def get_coordinates(data:dict) -> Coordinates | ErrorResponse:
|
31 |
print("Inside get coordinates")
|
32 |
print(data)
|
33 |
try:
|