Spaces:
Running
Running
Parsing address in the format that Llama3.3 returns
Browse files
app.py
CHANGED
@@ -54,9 +54,10 @@ def run(origin, destination, age, trip_duration, children, budget):
|
|
54 |
json_addresses = addresses.json_dict
|
55 |
if not json_addresses:
|
56 |
try:
|
57 |
-
json_addresses = json.loads(addresses.raw)
|
58 |
except json.JSONDecodeError as e:
|
59 |
-
|
|
|
60 |
return (result, None)
|
61 |
fig = filter_map(json_addresses["name"], json_addresses["lat"], json_addresses["lon"])
|
62 |
return (result, fig)
|
|
|
54 |
json_addresses = addresses.json_dict
|
55 |
if not json_addresses:
|
56 |
try:
|
57 |
+
json_addresses = json.loads(addresses.raw[8:-4])
|
58 |
except json.JSONDecodeError as e:
|
59 |
+
logger.error("Error loading Crew Output for addresses")
|
60 |
+
logger.info(addresses.raw)
|
61 |
return (result, None)
|
62 |
fig = filter_map(json_addresses["name"], json_addresses["lat"], json_addresses["lon"])
|
63 |
return (result, fig)
|