Spaces:
Paused
Paused
Update inference.py
Browse files- 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 |
-
|
| 76 |
-
except:
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
return
|
|
|
|
| 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
|