Part 1 — Hello world! [From your Python script to Supervisely APP]
In this part, we will show you how you can turn any Python code into a Supervisely application
Let's start with a simple python code.
worlds = ['Westeros', 'Azeroth', 'Middle Earth', 'Narnia']
for world in worlds:
Config file. We. Need. It. To add a Python application to Supervisely, let's create a configuration file for it. An example of a config file:
"name": "Hello world!",
"description": "There will be some description",
Pay attention to important fields:
docker_image— SDK version you were using, it doesn't matter in this app
main_script— path from repository
In this step, we create a repository and add our code to it.
1. Generate new personal token
Select "repo" access scope and click "Generate token" button. Save generated token — you will need it later.
personal github token
2. Create GitHub repository
3. Push app to repository
Make sure you have collected all the required files:
Then just push files to git:
git add --all
git commit -m "init first app"
git branch -M main
git remote add origin https://github.com/link-to-your-repo.git
git push -u origin main
We've almost reached the finish line! It remains to add the application to the Ecosystem.
2. Add your application
add private app button
- 1.In the
Github repository URLfield, specify the link to the directory containing the application's
- 2.In the
GitHub personal access tokenfield, paste your token that you saved in
add private app credentials