xiomarablanco commited on
Commit
7d4798f
1 Parent(s): 15336ed

using json.dumps

Browse files
Files changed (2) hide show
  1. app.py +5 -2
  2. assets/test_data.zip +3 -0
app.py CHANGED
@@ -16,7 +16,10 @@ def Main(configuration, uploadedFile):
16
  configuration_dict = json.loads(configuration)
17
 
18
  try:
19
- uploadedFilePath = uploadedFile.name
 
 
 
20
 
21
  config_json = load_json("configV2.json")
22
 
@@ -26,7 +29,7 @@ def Main(configuration, uploadedFile):
26
  response.setApiSettings(configuration)
27
 
28
  # modelResult = jsonify(response.processApiData())
29
- modelResult = response.processApiData()
30
  except Exception as e:
31
  error = "Oops: " + str(e)
32
 
 
16
  configuration_dict = json.loads(configuration)
17
 
18
  try:
19
+ if not uploadedFile:
20
+ uploadedFilePath = "./assets/test_data.zip"
21
+ else:
22
+ uploadedFilePath = uploadedFile.name
23
 
24
  config_json = load_json("configV2.json")
25
 
 
29
  response.setApiSettings(configuration)
30
 
31
  # modelResult = jsonify(response.processApiData())
32
+ modelResult = json.dumps(response.processApiData().__dict__)
33
  except Exception as e:
34
  error = "Oops: " + str(e)
35
 
assets/test_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1eb0edf1b869eed75a3660db9affd121859ff1479da481f813a0d2c463274810
3
+ size 39229657