PiKaHa commited on
Commit
9a02516
1 Parent(s): a03b8db

Update app.py with transformer embeddings and prediction pipeline

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -97,7 +97,8 @@ def process_target(target, selected_models, sequence, prediction_type):
97
 
98
  # Generate embeddings in the required format
99
  embedding, _ = get_embedding(sequence, esm_model_name, layer)
100
-
 
101
  if prediction_type == "Plant-Specific":
102
  # Random Forest prediction
103
  y_pred = model.predict(embedding)[0]
 
97
 
98
  # Generate embeddings in the required format
99
  embedding, _ = get_embedding(sequence, esm_model_name, layer)
100
+ embedding = embedding.astype(np.float64)
101
+ np.save(f"hf_embedding_{target}.npy", embedding)
102
  if prediction_type == "Plant-Specific":
103
  # Random Forest prediction
104
  y_pred = model.predict(embedding)[0]