update duration to 4800s
Browse files
app.py
CHANGED
@@ -139,15 +139,15 @@ def handle_name(name=None, pdb_input=None, model_version="ESM3"):
|
|
139 |
pdb_name = str(random.randint(0, 100000))
|
140 |
return f'{pdb_name}-Dyna1{"" if model_version == "ESM3" else "-ESM2"}'
|
141 |
|
142 |
-
@spaces.GPU(duration=
|
143 |
def predict_dynamics(sequence=None, pdb_input=None, chain_id='A', use_pdb_seq=False, model_version="ESM3", name=None, oauth_token: Optional[str] = None):
|
144 |
try:
|
145 |
# Validate ESM2 requires sequence
|
146 |
if model_version == "ESM2" and not sequence:
|
147 |
-
raise ValueError("
|
148 |
|
149 |
if model_version == "ESM3" and not (sequence or pdb_input):
|
150 |
-
raise ValueError("
|
151 |
|
152 |
base_name = handle_name(name, pdb_input, model_version)
|
153 |
|
@@ -269,7 +269,7 @@ with dyna1_app:
|
|
269 |
- Specify the chain ID if using a structure (default: A)
|
270 |
- Choose whether to use the sequence from the PDB structure
|
271 |
|
272 |
-
You can toggle between using the
|
273 |
have access to the `EvolutionaryScale/esm3-sm-open-v1` weights [here](https://huggingface.co/EvolutionaryScale/esm3-sm-open-v1).
|
274 |
|
275 |
Note: The model will automatically set up the required environment on first run.
|
|
|
139 |
pdb_name = str(random.randint(0, 100000))
|
140 |
return f'{pdb_name}-Dyna1{"" if model_version == "ESM3" else "-ESM2"}'
|
141 |
|
142 |
+
@spaces.GPU(duration=4800)
|
143 |
def predict_dynamics(sequence=None, pdb_input=None, chain_id='A', use_pdb_seq=False, model_version="ESM3", name=None, oauth_token: Optional[str] = None):
|
144 |
try:
|
145 |
# Validate ESM2 requires sequence
|
146 |
if model_version == "ESM2" and not sequence:
|
147 |
+
raise ValueError("ESM-2 model requires a sequence input. Please provide a protein sequence.")
|
148 |
|
149 |
if model_version == "ESM3" and not (sequence or pdb_input):
|
150 |
+
raise ValueError("ESM-3 model requires either a sequence, structure (PDB ID/file), or both. Please provide at least one input.")
|
151 |
|
152 |
base_name = handle_name(name, pdb_input, model_version)
|
153 |
|
|
|
269 |
- Specify the chain ID if using a structure (default: A)
|
270 |
- Choose whether to use the sequence from the PDB structure
|
271 |
|
272 |
+
You can toggle between using the ESM-3 and ESM-2 versions of the Dyna-1 model. To run with ESM-3, make sure you already
|
273 |
have access to the `EvolutionaryScale/esm3-sm-open-v1` weights [here](https://huggingface.co/EvolutionaryScale/esm3-sm-open-v1).
|
274 |
|
275 |
Note: The model will automatically set up the required environment on first run.
|