jonathang commited on
Commit
2b313b9
1 Parent(s): 9232135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -106,7 +106,7 @@ def greet(Amino_Acid_Sequence):
106
  processed_seq = Sequence.prepare(Amino_Acid_Sequence)
107
  raw_prediction = model.predict(processed_seq)[0]
108
  idx = raw_prediction.argmax()
109
- fam_asc = prot_mappings['id2fam_asc'][idx]
110
  fam_id = prot_mappings['fam_asc2fam_id'][fam_asc]
111
  gc.collect()
112
  return f"Input is {Amino_Acid_Sequence}.\nProcessed input is:\n{processed_seq}\n\nModel makes prediction:\n{raw_prediction}\nWhich gives index {idx}.\nWhich maps to family ascension {fam_asc} and ID {fam_id}"
 
106
  processed_seq = Sequence.prepare(Amino_Acid_Sequence)
107
  raw_prediction = model.predict(processed_seq)[0]
108
  idx = raw_prediction.argmax()
109
+ fam_asc = prot_mappings['id2fam_asc'][str(idx)]
110
  fam_id = prot_mappings['fam_asc2fam_id'][fam_asc]
111
  gc.collect()
112
  return f"Input is {Amino_Acid_Sequence}.\nProcessed input is:\n{processed_seq}\n\nModel makes prediction:\n{raw_prediction}\nWhich gives index {idx}.\nWhich maps to family ascension {fam_asc} and ID {fam_id}"