try snapshot download to make files available
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ from biotite.database import rcsb
|
|
| 16 |
from biotite.sequence import io as seqio
|
| 17 |
from biotite.structure import filter_amino_acids, io, spread_residue_wise, to_sequence
|
| 18 |
from gradio_molecule3d import Molecule3D
|
| 19 |
-
from huggingface_hub import HfApi
|
| 20 |
from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError
|
| 21 |
from loguru import logger
|
| 22 |
from matplotlib.cm import ScalarMappable
|
|
@@ -444,13 +444,13 @@ def check_user_access(oauth_token: gr.OAuthToken | None):
|
|
| 444 |
print(api)
|
| 445 |
|
| 446 |
# Test access by trying to get repo info
|
| 447 |
-
|
| 448 |
repo_id="EvolutionaryScale/esm3-sm-open-v1",
|
| 449 |
repo_type="model", # or "dataset" or "space"
|
| 450 |
token=token,
|
| 451 |
)
|
| 452 |
|
| 453 |
-
|
| 454 |
|
| 455 |
return (
|
| 456 |
True,
|
|
|
|
| 16 |
from biotite.sequence import io as seqio
|
| 17 |
from biotite.structure import filter_amino_acids, io, spread_residue_wise, to_sequence
|
| 18 |
from gradio_molecule3d import Molecule3D
|
| 19 |
+
from huggingface_hub import HfApi, snapshot_download
|
| 20 |
from huggingface_hub.utils import GatedRepoError, RepositoryNotFoundError
|
| 21 |
from loguru import logger
|
| 22 |
from matplotlib.cm import ScalarMappable
|
|
|
|
| 444 |
print(api)
|
| 445 |
|
| 446 |
# Test access by trying to get repo info
|
| 447 |
+
_ = api.repo_info(
|
| 448 |
repo_id="EvolutionaryScale/esm3-sm-open-v1",
|
| 449 |
repo_type="model", # or "dataset" or "space"
|
| 450 |
token=token,
|
| 451 |
)
|
| 452 |
|
| 453 |
+
snapshot_download(repo_id="EvolutionaryScale/esm3-sm-open-v1", token=token)
|
| 454 |
|
| 455 |
return (
|
| 456 |
True,
|