Skip to content

Commit

Permalink
Update app.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AstraBert authored Jun 20, 2024
1 parent 58e29d5 commit a9d1406
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from transformers.models.esm.openfold_utils.feats import atom14_to_atom37
from Bio import SeqIO
import gradio as gr
import spaces
from gradio_molecule3d import Molecule3D

reps = [
Expand Down Expand Up @@ -118,7 +117,6 @@ def convert_outputs_to_pdb(outputs):

model.trunk.set_chunk_size(64)

@spaces.GPU(duration=120)
def fold_protein(test_protein):
tokenized_input = tokenizer([test_protein], return_tensors="pt", add_special_tokens=False)['input_ids']
tokenized_input = tokenized_input.cuda()
Expand All @@ -130,7 +128,6 @@ def fold_protein(test_protein):
html = molecule("output_structure.pdb")
return html, "output_structure.pdb"

@spaces.GPU(duration=180)
def fold_protein_wpdb(test_protein, pdb_path):
tokenized_input = tokenizer([test_protein], return_tensors="pt", add_special_tokens=False)['input_ids']
tokenized_input = tokenized_input.cuda()
Expand Down Expand Up @@ -192,4 +189,4 @@ def show_split(inputfile):

demo = gr.TabbedInterface([iface, demo1], ["Single Protein Structure Prediction", "Bulk Protein Structure Prediction"])

demo.launch()
demo.launch(server_name="0.0.0.0", server_port=7860)

0 comments on commit a9d1406

Please sign in to comment.