Spaces:
Runtime error
Runtime error
Commit
·
e3469be
1
Parent(s):
8190b36
cross added
Browse files
app.py
CHANGED
|
@@ -102,11 +102,16 @@ def detect():
|
|
| 102 |
print(f)
|
| 103 |
print(type(w))
|
| 104 |
print(type(f))
|
|
|
|
| 105 |
response=app.make_response(json.dumps({
|
| 106 |
"window_contours":w,
|
| 107 |
"floor_contours" :f,
|
| 108 |
"windows_vertices":windows_vertices
|
| 109 |
}))
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
response.content_type="application/json"
|
| 111 |
return response
|
| 112 |
|
|
|
|
| 102 |
print(f)
|
| 103 |
print(type(w))
|
| 104 |
print(type(f))
|
| 105 |
+
|
| 106 |
response=app.make_response(json.dumps({
|
| 107 |
"window_contours":w,
|
| 108 |
"floor_contours" :f,
|
| 109 |
"windows_vertices":windows_vertices
|
| 110 |
}))
|
| 111 |
+
|
| 112 |
+
response.headers.add("Access-Control-Allow-Origin", "*")
|
| 113 |
+
response.headers.add("Access-Control-Allow-Headers", "*")
|
| 114 |
+
response.headers.add("Access-Control-Allow-Methods", "*")
|
| 115 |
response.content_type="application/json"
|
| 116 |
return response
|
| 117 |
|