credent007 commited on
Commit
34f3791
·
verified ·
1 Parent(s): 24690f2

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +13 -13
inference.py CHANGED
@@ -70,16 +70,16 @@ def process_document(image):
70
 
71
  if start != -1 and end != -1:
72
  response = response[start:end]
73
-
74
- try:
75
- parsed = json.loads(response)
76
- except:
77
- parsed = {
78
- "error":[
79
- response
80
- ]
81
- # "Invalid JSON",
82
- # "raw": response
83
- }
84
-
85
- return parsed
 
70
 
71
  if start != -1 and end != -1:
72
  response = response[start:end]
73
+
74
+ # try:
75
+ # parsed = json.loads(response)
76
+ # except:
77
+ # parsed = {
78
+ # "error":[
79
+ # response
80
+ # ]
81
+ # # "Invalid JSON",
82
+ # # "raw": response
83
+ # }
84
+ print(f"The type of response is {response}")
85
+ return response