Skip to content

Commit

Permalink
basic push
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxTeselkin committed Jul 10, 2023
1 parent ef2b014 commit 94ba28f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions train/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from urllib.request import urlopen
import math
import ruamel.yaml
from fastapi import Response, Request


# function for updating global variables
Expand Down Expand Up @@ -492,6 +493,7 @@ def update_globals(new_dataset_ids):
]
),
)
server = app.get_server()


@dataset_selector.value_changed
Expand Down Expand Up @@ -1269,3 +1271,21 @@ def upload_monitor(monitor, api: sly.Api, progress: sly.Progress):
sly.output.set_directory(remote_artifacts_dir)
# stop app
app.stop()


@server.post("/auto_train")
def auto_train(response: Response, request: Request):
data = request.data
project_id = data["project_id"]
task_type = data["task_type"]

dataset_selector.disable()
classes_table.read_project_from_id(project_id)
select_data_button.hide()
select_done.show()
reselect_data_button.show()
curr_step = stepper.get_active_step()
curr_step += 1
stepper.set_active_step(curr_step)
card_classes.unlock()
card_classes.uncollapse()

0 comments on commit 94ba28f

Please sign in to comment.