Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,11 @@ def app_function(input_json):
|
|
62 |
print("something happend")
|
63 |
# Parse the input JSON string
|
64 |
print(input_json)
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# Convert 'df_distances' from a list of lists into a DataFrame directly
|
68 |
df_distances = pd.DataFrame(inputs["df_distances"])
|
|
|
62 |
print("something happend")
|
63 |
# Parse the input JSON string
|
64 |
print(input_json)
|
65 |
+
|
66 |
+
try:
|
67 |
+
inputs = json.loads(input_json)
|
68 |
+
except:
|
69 |
+
inputs = json.loads(input_json.replace("'", '"'))
|
70 |
|
71 |
# Convert 'df_distances' from a list of lists into a DataFrame directly
|
72 |
df_distances = pd.DataFrame(inputs["df_distances"])
|