Skip to content

Commit 23601b9

Browse files
authored
Fixed ds.visualize for local datasets. (#3039)
* Fixed ds.visualize for local datasets. * Bump deeplake version.
1 parent d725599 commit 23601b9

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

deeplake/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
]
9292

9393

94-
__version__ = "3.9.42"
94+
__version__ = "3.9.43"
9595
warn_if_update_required(__version__)
9696
__encoded_version__ = np.array(__version__)
9797
config = {"s3": Config(max_pool_connections=50, connect_timeout=300, read_timeout=300)}

deeplake/visualizer/visualizer.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,16 @@ def access_creds(path: str):
186186
return Response("", 404)
187187

188188

189-
@_APP.route("/<path:path>")
189+
@_APP.route("/<path:path>", methods=["GET", "HEAD", "OPTIONS"])
190190
def access_data(path: str):
191+
if request.method == "OPTIONS":
192+
# Handle preflight request
193+
response = Response("", 200)
194+
response.headers.add("Access-Control-Allow-Origin", "*")
195+
response.headers.add("Access-Control-Allow-Methods", "GET, HEAD, OPTIONS")
196+
response.headers.add("Access-Control-Allow-Headers", "*")
197+
return response
198+
191199
try:
192200
paths = path.split("/", 1)
193201
range_header = request.headers.get("Range", None)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "deeplake"
3-
version = "3.9.42"
3+
version = "3.9.43"
44
description = "Activeloop Deep Lake"
55
authors = ["activeloop.ai <[email protected]>"]
66
license = "MPL-2.0"

0 commit comments

Comments
 (0)