Skip to content

Commit

Permalink
update env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Jan 3, 2024
1 parent 5a7fd45 commit c178cd2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions supervisely/export_weights/src/sly_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
from utils.torch_utils import select_device
from supervisely.app.v1.app_service import AppService

my_app: AppService = AppService()
my_app = AppService()

TEAM_ID = int(os.environ['context.teamId'])
WORKSPACE_ID = int(os.environ['context.workspaceId'])
TASK_ID = int(os.environ['TASK_ID'])
customWeightsPath = os.environ['modal.state.slyFile']
TEAM_ID = sly.env.team_id()
WORKSPACE_ID = sly.env.workspace_id()
TASK_ID = sly.env.task_id()
customWeightsPath = sly.env.file(raise_not_found=False)
if customWeightsPath is None:
raise Exception("Weights path is not found. Please, specify it in the modal.")
device = select_device(device='cpu')
image_size = 640
ts = None
Expand Down

0 comments on commit c178cd2

Please sign in to comment.