modified links for Angione-Lab
Browse files- README.md +1 -1
- S2FApp/Dockerfile +2 -2
- S2FApp/README.md +1 -1
- S2FApp/download_ckp.py +1 -1
README.md
CHANGED
|
@@ -31,7 +31,7 @@ streamlit run app.py
|
|
| 31 |
---
|
| 32 |
### 2. Web App Online
|
| 33 |
|
| 34 |
-
Use the [online app](https://huggingface.co/spaces/
|
| 35 |
|
| 36 |
<p align="center">
|
| 37 |
<img src="./S2FApp/res/ss.png" width="450" alt="Shape2Force Web App" />
|
|
|
|
| 31 |
---
|
| 32 |
### 2. Web App Online
|
| 33 |
|
| 34 |
+
Use the [online app](https://huggingface.co/spaces/Angione-Lab/Shape2force) on Hugging Face.
|
| 35 |
|
| 36 |
<p align="center">
|
| 37 |
<img src="./S2FApp/res/ss.png" width="450" alt="Shape2Force Web App" />
|
S2FApp/Dockerfile
CHANGED
|
@@ -30,8 +30,8 @@ RUN mkdir -p ckp && chown user:user ckp
|
|
| 30 |
|
| 31 |
# Download checkpoints from Hugging Face if ckp is empty (for Space deployment)
|
| 32 |
# Requires HF_TOKEN secret in Space Settings (https://huggingface.co/settings/tokens)
|
| 33 |
-
# for private model repos. Set HF_MODEL_REPO to your model repo, e.g.
|
| 34 |
-
ARG HF_MODEL_REPO=
|
| 35 |
ENV HF_MODEL_REPO=${HF_MODEL_REPO}
|
| 36 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 37 |
HF_TOKEN=$(cat /run/secrets/HF_TOKEN) python download_ckp.py
|
|
|
|
| 30 |
|
| 31 |
# Download checkpoints from Hugging Face if ckp is empty (for Space deployment)
|
| 32 |
# Requires HF_TOKEN secret in Space Settings (https://huggingface.co/settings/tokens)
|
| 33 |
+
# for private model repos. Set HF_MODEL_REPO to your model repo, e.g. Angione-Lab/Shape2Force
|
| 34 |
+
ARG HF_MODEL_REPO=Angione-Lab/Shape2Force
|
| 35 |
ENV HF_MODEL_REPO=${HF_MODEL_REPO}
|
| 36 |
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
|
| 37 |
HF_TOKEN=$(cat /run/secrets/HF_TOKEN) python download_ckp.py
|
S2FApp/README.md
CHANGED
|
@@ -24,7 +24,7 @@ pip install -r requirements.txt
|
|
| 24 |
streamlit run app.py
|
| 25 |
```
|
| 26 |
|
| 27 |
-
Checkpoints are downloaded automatically from the [Shape2Force model repo](https://huggingface.co/
|
| 28 |
|
| 29 |
## Usage
|
| 30 |
|
|
|
|
| 24 |
streamlit run app.py
|
| 25 |
```
|
| 26 |
|
| 27 |
+
Checkpoints are downloaded automatically from the [Shape2Force model repo](https://huggingface.co/Angione-Lab/Shape2Force) when running in Docker. For local use, place `.pth` files in `ckp/`.
|
| 28 |
|
| 29 |
## Usage
|
| 30 |
|
S2FApp/download_ckp.py
CHANGED
|
@@ -11,7 +11,7 @@ if not has_any:
|
|
| 11 |
try:
|
| 12 |
from huggingface_hub import hf_hub_download, list_repo_files
|
| 13 |
|
| 14 |
-
repo = os.environ.get("HF_MODEL_REPO", "
|
| 15 |
files = list_repo_files(repo)
|
| 16 |
pth_files = [f for f in files if f.startswith("ckp/") and f.endswith(".pth")]
|
| 17 |
# For spheroid: only download ckp_spheroid_FN.pth (not ckp_spheroid_GN.pth or others)
|
|
|
|
| 11 |
try:
|
| 12 |
from huggingface_hub import hf_hub_download, list_repo_files
|
| 13 |
|
| 14 |
+
repo = os.environ.get("HF_MODEL_REPO", "Angione-Lab/Shape2Force")
|
| 15 |
files = list_repo_files(repo)
|
| 16 |
pth_files = [f for f in files if f.startswith("ckp/") and f.endswith(".pth")]
|
| 17 |
# For spheroid: only download ckp_spheroid_FN.pth (not ckp_spheroid_GN.pth or others)
|