sagawa commited on
Commit
5ca8306
1 Parent(s): a0cb774

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -44,15 +44,14 @@ def predict_stability(model_choice, organism_choice, pdb_file=None, sequence=Non
44
  else:
45
  cell_line = "NIH3T3"
46
  # If sequence is provided directly
47
- return str(sequences)
48
- # if sequence:
49
- # cfg.model = f"sagawa/PLTNUM-{model_choice}-{cell_line}"
50
- # cfg.architecture = model_choice
51
- # cfg.model_path = f"sagawa/PLTNUM-{model_choice}-{cell_line}"
52
- # output = predict(cfg, sequence)
53
- # return f"Predicted Stability using {model_choice} for {organism_choice}: Example Output with sequence {output}..."
54
- # else:
55
- # return "No valid input provided."
56
 
57
 
58
  def get_foldseek_seq(pdb_path):
@@ -73,7 +72,7 @@ def predict(cfg, sequence):
73
  cfg.max_length += 1
74
 
75
  seed_everything(cfg.seed)
76
-
77
  df = pd.DataFrame({cfg.sequence_col: [sequence]})
78
 
79
  tokenizer = AutoTokenizer.from_pretrained(
 
44
  else:
45
  cell_line = "NIH3T3"
46
  # If sequence is provided directly
47
+ if sequence:
48
+ cfg.model = f"sagawa/PLTNUM-{model_choice}-{cell_line}"
49
+ cfg.architecture = model_choice
50
+ cfg.model_path = f"sagawa/PLTNUM-{model_choice}-{cell_line}"
51
+ output = predict(cfg, sequence)
52
+ return f"Predicted Stability using {model_choice} for {organism_choice}: Example Output with sequence {output}..."
53
+ else:
54
+ return "No valid input provided."
 
55
 
56
 
57
  def get_foldseek_seq(pdb_path):
 
72
  cfg.max_length += 1
73
 
74
  seed_everything(cfg.seed)
75
+ error
76
  df = pd.DataFrame({cfg.sequence_col: [sequence]})
77
 
78
  tokenizer = AutoTokenizer.from_pretrained(