Aayush Kothari commited on
Commit ·
e60256b
1
Parent(s): 9d0e601
Pin sdk_version to 5.49.1; let the builder own gradio
Browse files- README.md +32 -5
- requirements.txt +14 -6
README.md
CHANGED
|
@@ -1,15 +1,42 @@
|
|
| 1 |
---
|
| 2 |
title: Conformer
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: gray
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
python_version: '3.12'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
-
short_description:
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Conformer
|
| 3 |
+
emoji: 🧬
|
| 4 |
colorFrom: gray
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
| 8 |
python_version: '3.12'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
license: mit
|
| 12 |
+
short_description: BRAID molecular workbench with BRAIDBERTa
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Conformer
|
| 16 |
+
|
| 17 |
+
A browser workbench for the BRAID molecular line notation and the BRAIDBERTa /
|
| 18 |
+
DeepBERTa encoders. Load molecules, convert between representations, draw
|
| 19 |
+
structures, compute descriptors, benchmark tokenisations, embed and compare
|
| 20 |
+
encoders, export datasets.
|
| 21 |
+
|
| 22 |
+
Nothing to install. Structure parsing, drawing, descriptors and fingerprints run
|
| 23 |
+
in your browser via RDKit's WebAssembly build. BRAID conversion and the encoders
|
| 24 |
+
run on this Space, on CPU.
|
| 25 |
+
|
| 26 |
+
- Code: https://github.com/AayushK-othari/braid
|
| 27 |
+
- Model: https://huggingface.co/aakothari/BRAIDBERTa
|
| 28 |
+
|
| 29 |
+
`GET /version` returns the git SHA, pinned model revisions and package versions
|
| 30 |
+
behind whatever you are looking at.
|
| 31 |
+
|
| 32 |
+
## A note on `sdk_version`
|
| 33 |
+
|
| 34 |
+
The Space builder appends `gradio==<sdk_version>` and `spaces==<version>` to the
|
| 35 |
+
`pip install` line it runs against `requirements.txt`. Those two packages are
|
| 36 |
+
therefore deliberately absent from `requirements.txt` — pinning them in both
|
| 37 |
+
places yields two conflicting `==` constraints and the build fails to resolve.
|
| 38 |
+
|
| 39 |
+
`5.49.1` is not arbitrary. Gradio 6.x requires `huggingface-hub>=1.2`, which
|
| 40 |
+
`transformers==4.49.0` forbids (`<1.0`). Gradio 5.x is the branch that coexists
|
| 41 |
+
with the transformers 4 stack these results were produced on. Changing this
|
| 42 |
+
number means changing the encoder stack, so re-validate locally before you do.
|
requirements.txt
CHANGED
|
@@ -1,18 +1,25 @@
|
|
| 1 |
# Pinned to the stack this project was actually validated against.
|
| 2 |
#
|
| 3 |
-
#
|
| 4 |
#
|
| 5 |
# 1. ZeroGPU accepts only torch 2.11.0, 2.10.0, 2.9.1 or 2.8.0.
|
| 6 |
# 2. gradio 6.x requires huggingface-hub >= 1.2, which transformers 4.x
|
| 7 |
# forbids (< 1.0). gradio 5.x is the branch that coexists with the
|
| 8 |
# transformers 4.49 stack running locally.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
#
|
| 10 |
# Do NOT bump transformers to 5.x here without re-running the validation
|
| 11 |
# locally first. Deploying a different major version than the one that
|
| 12 |
# produced your numbers is how a discrepancy becomes unexplainable.
|
| 13 |
-
|
| 14 |
-
#
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
# --- web layer -------------------------------------------------------------
|
| 18 |
fastapi==0.139.2
|
|
@@ -26,8 +33,9 @@ braids-mol @ git+https://github.com/AayushK-othari/braid.git@main
|
|
| 26 |
|
| 27 |
# --- encoders --------------------------------------------------------------
|
| 28 |
# No CPU-only index here: ZeroGPU expects the standard CUDA build. The app is
|
| 29 |
-
# CPU-bound and simply never requests a GPU.
|
|
|
|
| 30 |
torch==2.8.0
|
| 31 |
transformers==4.49.0
|
| 32 |
tokenizers==0.21.0
|
| 33 |
-
huggingface-hub==0.36.2
|
|
|
|
| 1 |
# Pinned to the stack this project was actually validated against.
|
| 2 |
#
|
| 3 |
+
# Three constraints shape these versions, all discovered the hard way:
|
| 4 |
#
|
| 5 |
# 1. ZeroGPU accepts only torch 2.11.0, 2.10.0, 2.9.1 or 2.8.0.
|
| 6 |
# 2. gradio 6.x requires huggingface-hub >= 1.2, which transformers 4.x
|
| 7 |
# forbids (< 1.0). gradio 5.x is the branch that coexists with the
|
| 8 |
# transformers 4.49 stack running locally.
|
| 9 |
+
# 3. gradio and spaces are NOT pinned here. The Space builder appends
|
| 10 |
+
# `gradio==<sdk_version from README.md>` and `spaces==<version>` to its
|
| 11 |
+
# own pip install line. Pinning either one here as well gives pip two
|
| 12 |
+
# conflicting `==` constraints on one package and the build dies with
|
| 13 |
+
# ResolutionImpossible. The gradio version is controlled by
|
| 14 |
+
# `sdk_version` in README.md and nowhere else.
|
| 15 |
#
|
| 16 |
# Do NOT bump transformers to 5.x here without re-running the validation
|
| 17 |
# locally first. Deploying a different major version than the one that
|
| 18 |
# produced your numbers is how a discrepancy becomes unexplainable.
|
| 19 |
+
#
|
| 20 |
+
# Running outside a Space (Cloud Run, Docker, local): add `gradio==5.49.1`
|
| 21 |
+
# back if you are launching app.py, or skip it entirely and run backend.py,
|
| 22 |
+
# which never imports gradio.
|
| 23 |
|
| 24 |
# --- web layer -------------------------------------------------------------
|
| 25 |
fastapi==0.139.2
|
|
|
|
| 33 |
|
| 34 |
# --- encoders --------------------------------------------------------------
|
| 35 |
# No CPU-only index here: ZeroGPU expects the standard CUDA build. The app is
|
| 36 |
+
# CPU-bound and simply never requests a GPU. The Space base image already
|
| 37 |
+
# ships torch 2.8.0, so this pin matches rather than triggers a reinstall.
|
| 38 |
torch==2.8.0
|
| 39 |
transformers==4.49.0
|
| 40 |
tokenizers==0.21.0
|
| 41 |
+
huggingface-hub==0.36.2
|