Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import os, tempfile
|
|
5 |
import torch
|
6 |
import py3Dmol
|
7 |
from huggingface_hub import login
|
8 |
-
import spaces
|
9 |
|
10 |
from esm.utils.structure.protein_chain import ProteinChain
|
11 |
from esm.models.esm3 import ESM3
|
@@ -22,6 +22,7 @@ theme = gr.themes.Monochrome(
|
|
22 |
)
|
23 |
|
24 |
## Function to get model from Hugging Face using token
|
|
|
25 |
def get_model(model_name, token):
|
26 |
login(token=token)
|
27 |
|
@@ -34,7 +35,6 @@ def get_model(model_name, token):
|
|
34 |
return model
|
35 |
|
36 |
## Function to get PDB data
|
37 |
-
@spaces.GPU()
|
38 |
def get_pdb(pdb_id, chain_id):
|
39 |
pdb = ProteinChain.from_rcsb(pdb_id, chain_id)
|
40 |
# return [pdb.sequence, render_pdb(pdb.to_pdb_string())]
|
|
|
5 |
import torch
|
6 |
import py3Dmol
|
7 |
from huggingface_hub import login
|
8 |
+
# import spaces
|
9 |
|
10 |
from esm.utils.structure.protein_chain import ProteinChain
|
11 |
from esm.models.esm3 import ESM3
|
|
|
22 |
)
|
23 |
|
24 |
## Function to get model from Hugging Face using token
|
25 |
+
# @spaces.GPU()
|
26 |
def get_model(model_name, token):
|
27 |
login(token=token)
|
28 |
|
|
|
35 |
return model
|
36 |
|
37 |
## Function to get PDB data
|
|
|
38 |
def get_pdb(pdb_id, chain_id):
|
39 |
pdb = ProteinChain.from_rcsb(pdb_id, chain_id)
|
40 |
# return [pdb.sequence, render_pdb(pdb.to_pdb_string())]
|