Skip to content

Commit

Permalink
output urls without server address (#3)
Browse files Browse the repository at this point in the history
* fix output url path, sly version upgrade, min instance version added

* Update config.json

* Update requirements.txt
  • Loading branch information
cxnt authored Jun 13, 2022
1 parent b41e63e commit b8f8400
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"export"
],
"description": "images and JSON annotations",
"docker_image": "supervisely/base-py-sdk:6.8.4",
"docker_image": "supervisely/base-py-sdk:6.23.0",
"instance_version": "6.4.57",
"main_script": "src/main.py",
"modal_template": "src/modal.html",
"modal_template_state": {
Expand All @@ -24,4 +25,4 @@
"context_root": "Download as"
},
"poster": "https://i.imgur.com/9eRexuy.png"
}
}
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
supervisely==6.8.4
supervisely[apps]==6.8.4
supervisely==6.23.0
supervisely[apps]==6.23.0
6 changes: 3 additions & 3 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import supervisely_lib as sly
import supervisely as sly
from supervisely.api.module_api import ApiField
from supervisely.io.fs import get_file_ext
from supervisely.app.v1.app_service import AppService
Expand Down Expand Up @@ -86,8 +86,8 @@ def _print_progress(monitor, upload_progress):

file_info = api.file.upload(TEAM_ID, result_archive, remote_archive_path,
lambda m: _print_progress(m, upload_progress))
app_logger.info("Uploaded to Team-Files: {!r}".format(file_info.full_storage_url))
api.task.set_output_archive(task_id, file_info.id, full_archive_name, file_url=file_info.full_storage_url)
app_logger.info("Uploaded to Team-Files: {!r}".format(file_info.storage_path))
api.task.set_output_archive(task_id, file_info.id, full_archive_name, file_url=file_info.storage_path)
my_app.stop()


Expand Down

0 comments on commit b8f8400

Please sign in to comment.