Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions deeplake/requirements/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ av>=8.1.0; python_version >= '3.7' or sys_platform != 'win32'
pydicom
IPython
flask
Flask-WTF
pyjwt
laspy
nibabel
Expand Down
4 changes: 4 additions & 0 deletions deeplake/visualizer/video_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from typing import Optional, Callable, Tuple
from flask import Flask, request, Response
from flask_wtf import CSRFProtect

from deeplake.core.meta.encode.chunk_id import ChunkIdEncoder
from deeplake.core.storage import StorageProvider
from deeplake.core.meta.encode.byte_positions import BytePositionsEncoder
Expand Down Expand Up @@ -175,6 +177,8 @@ def _stop_server():


_APP = Flask("video_stream")
csrf = CSRFProtect()
csrf.init_app(_APP)


@_APP.after_request
Expand Down
4 changes: 4 additions & 0 deletions deeplake/visualizer/visualizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from typing import Dict, Optional, Union
import uuid
from flask import Flask, request, Response
from flask_wtf import CSRFProtect

from deeplake.core.link_creds import LinkCreds # type: ignore
from deeplake.core.storage import StorageProvider
from deeplake.core.storage.s3 import S3Provider
Expand All @@ -20,6 +22,8 @@

_SERVER_THREAD: Optional[threading.Thread] = None
_APP = Flask("dataset_visualizer")
csrf = CSRFProtect()
csrf.init_app(_APP)

log = logging.getLogger("werkzeug")
log.setLevel(logging.ERROR)
Expand Down