simonduerr commited on
Commit
d6bb046
1 Parent(s): b805158

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -102,7 +102,7 @@ def run_protgpt2(startsequence, length, repetitionPenalty, top_k_poolsize, max_s
102
  #device.reset()
103
  #print(gpu_usage())
104
  return sequences
105
-
106
  def run_alphafold(startsequence):
107
  print(gpu_usage())
108
  model_runners = {}
@@ -152,7 +152,7 @@ def update(inp):
152
  print("Running AF on", inp)
153
  startsequence = inp
154
  # run alphafold using ray
155
- plddts = run_alphafold(startsequence)
156
  print(plddts)
157
  x = np.arange(10)
158
  #plt.style.use(["seaborn-ticks", "seaborn-talk"])
@@ -398,4 +398,6 @@ with proteindream:
398
  #seqChoice.change(fn=update_seqs, inputs=seqChoice, outputs=chosenSeq)
399
  btn2.click(fn=update, inputs=chosenSeq, outputs=[mol, plot, meanpLDDT])
400
 
 
 
401
  proteindream.launch(share=False)
 
102
  #device.reset()
103
  #print(gpu_usage())
104
  return sequences
105
+ @ray.remote
106
  def run_alphafold(startsequence):
107
  print(gpu_usage())
108
  model_runners = {}
 
152
  print("Running AF on", inp)
153
  startsequence = inp
154
  # run alphafold using ray
155
+ plddts = ray.get(run_alphafold.remote(startsequence))
156
  print(plddts)
157
  x = np.arange(10)
158
  #plt.style.use(["seaborn-ticks", "seaborn-talk"])
 
398
  #seqChoice.change(fn=update_seqs, inputs=seqChoice, outputs=chosenSeq)
399
  btn2.click(fn=update, inputs=chosenSeq, outputs=[mol, plot, meanpLDDT])
400
 
401
+ ray.init(runtime_env={"working_dir": "."})
402
+
403
  proteindream.launch(share=False)