wwydmanski commited on
Commit
31ae121
1 Parent(s): b61d085

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ def convert_outputs_to_pdb(outputs):
27
  return pdbs
28
 
29
  def fold_prot_locally(sequence):
30
- tokenized_input = tokenizer([sequence], return_tensors="pt", add_special_tokens=False)['input_ids']
31
 
32
  with torch.no_grad():
33
  output = model(tokenized_input)
@@ -35,7 +35,7 @@ def fold_prot_locally(sequence):
35
  return pdb
36
 
37
  tokenizer = AutoTokenizer.from_pretrained("facebook/esmfold_v1")
38
- model = EsmForProteinFolding.from_pretrained("facebook/esmfold_v1", low_cpu_mem_usage=True)
39
 
40
  iface = gr.Interface(fn=fold_prot_locally, inputs="text", outputs="text")
41
  iface.launch()
 
27
  return pdbs
28
 
29
  def fold_prot_locally(sequence):
30
+ tokenized_input = tokenizer([sequence], return_tensors="pt", add_special_tokens=False)['input_ids'].cuda()
31
 
32
  with torch.no_grad():
33
  output = model(tokenized_input)
 
35
  return pdb
36
 
37
  tokenizer = AutoTokenizer.from_pretrained("facebook/esmfold_v1")
38
+ model = EsmForProteinFolding.from_pretrained("facebook/esmfold_v1", low_cpu_mem_usage=True).cuda().half()
39
 
40
  iface = gr.Interface(fn=fold_prot_locally, inputs="text", outputs="text")
41
  iface.launch()