Merge pull request #2 from andreped/demo
Browse filesAdded workflows, shell scripts, and README
- .github/workflows/deploy.yml +20 -0
- .github/workflows/filesize.yml +16 -0
- .github/workflows/linting.yml +26 -0
- README.md +24 -1
- shell/format.sh +4 -0
- shell/lint.sh +23 -0
.github/workflows/deploy.yml
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Deploy
|
2 |
+
on:
|
3 |
+
push:
|
4 |
+
branches: [ main ]
|
5 |
+
|
6 |
+
# to run this workflow manually from the Actions tab
|
7 |
+
workflow_dispatch:
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
sync-to-hub:
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
steps:
|
13 |
+
- uses: actions/checkout@v3
|
14 |
+
with:
|
15 |
+
fetch-depth: 0
|
16 |
+
lfs: true
|
17 |
+
- name: Push to hub
|
18 |
+
env:
|
19 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
20 |
+
run: git push https://andreped:[email protected]/spaces/andreped/LyNoS main
|
.github/workflows/filesize.yml
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Check file size
|
2 |
+
on: # or directly `on: [push]` to run the action on every push on any branch
|
3 |
+
pull_request:
|
4 |
+
branches: [ main ]
|
5 |
+
|
6 |
+
# to run this workflow manually from the Actions tab
|
7 |
+
workflow_dispatch:
|
8 |
+
|
9 |
+
jobs:
|
10 |
+
check-filesize:
|
11 |
+
runs-on: ubuntu-latest
|
12 |
+
steps:
|
13 |
+
- name: Check large files
|
14 |
+
uses: ActionsDesk/[email protected]
|
15 |
+
with:
|
16 |
+
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
|
.github/workflows/linting.yml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Linting
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches:
|
6 |
+
- '*'
|
7 |
+
pull_request:
|
8 |
+
branches:
|
9 |
+
- '*'
|
10 |
+
workflow_dispatch:
|
11 |
+
|
12 |
+
jobs:
|
13 |
+
build:
|
14 |
+
runs-on: ubuntu-20.04
|
15 |
+
steps:
|
16 |
+
- uses: actions/checkout@v1
|
17 |
+
- name: Set up Python 3.7
|
18 |
+
uses: actions/setup-python@v2
|
19 |
+
with:
|
20 |
+
python-version: 3.7
|
21 |
+
|
22 |
+
- name: Install lint dependencies
|
23 |
+
run: pip install wheel setuptools black==22.3.0 isort==5.10.1 flake8==4.0.1
|
24 |
+
|
25 |
+
- name: Lint the code
|
26 |
+
run: sh shell/lint.sh
|
README.md
CHANGED
@@ -1 +1,24 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: 'AeroPath: automatic airway segmentation using deep learning'
|
3 |
+
colorFrom: indigo
|
4 |
+
colorTo: indigo
|
5 |
+
sdk: docker
|
6 |
+
app_port: 7860
|
7 |
+
emoji: 🫁
|
8 |
+
pinned: false
|
9 |
+
license: mit
|
10 |
+
app_file: demo/app.py
|
11 |
+
---
|
12 |
+
|
13 |
+
<div align="center">
|
14 |
+
<h1 align="center">🫁 LyNoS 🤗</h1>
|
15 |
+
<h3 align="center">A lymph node segmentation benchmark from contrast CT</h3>
|
16 |
+
|
17 |
+
[](https://github.com/raidionics/LyNoS/blob/main/LICENSE.md)
|
18 |
+
[](https://github.com/raidionics/LyNoS/actions/workflows/deploy.yml)
|
19 |
+
<a target="_blank" href="https://huggingface.co/spaces/andreped/LyNoS"><img src="https://img.shields.io/badge/🤗%20Hugging%20Face-Spaces-yellow.svg"></a>
|
20 |
+
[](https://arxiv.org/abs/2311.01138)
|
21 |
+
|
22 |
+
**LyNoS** was developed by SINTEF Medical Image Analysis to accelerate medical AI research.
|
23 |
+
|
24 |
+
</div>
|
shell/format.sh
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
isort --sl demo/src/ demo/app.py
|
3 |
+
black --line-length 160 demo/src/ demo/app.py
|
4 |
+
flake8 demo/src/ demo/app.py
|
shell/lint.sh
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
isort --check --sl -c demo/src/ demo/app.py
|
3 |
+
if ! [ $? -eq 0 ]
|
4 |
+
then
|
5 |
+
echo "Please run \"sh shell/format.sh\" to format the code."
|
6 |
+
exit 1
|
7 |
+
fi
|
8 |
+
echo "no issues with isort"
|
9 |
+
flake8 demo/src/ demo/app.py
|
10 |
+
if ! [ $? -eq 0 ]
|
11 |
+
then
|
12 |
+
echo "Please fix the code style issue."
|
13 |
+
exit 1
|
14 |
+
fi
|
15 |
+
echo "no issues with flake8"
|
16 |
+
black --check --line-length 160 demo/src/ demo/app.py
|
17 |
+
if ! [ $? -eq 0 ]
|
18 |
+
then
|
19 |
+
echo "Please run \"sh shell/format.sh\" to format the code."
|
20 |
+
exit 1
|
21 |
+
fi
|
22 |
+
echo "no issues with black"
|
23 |
+
echo "linting success!"
|