serJD commited on
Commit
b6f5dd4
1 Parent(s): 37ece11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
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
- inputs = json.loads(input_json)
 
 
 
 
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"])