joaopimenta commited on
Commit
f499507
Β·
verified Β·
1 Parent(s): 932aa21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -330,8 +330,6 @@ elif page== "πŸ“Š Tabular Data":
330
  # Create a formatted string for `top_factors` to be shown in the UI
331
  top_factors = "\n".join([f"- {feat}: {round(value, 2)} impact" for feat, value in top_features])
332
 
333
- # 🎭 **Streamlit UI**
334
- import streamlit as st
335
  import time
336
  import random
337
  from textwrap import dedent
@@ -428,7 +426,6 @@ elif page == "πŸ“ Clinical Text Notes":
428
  text = re.sub(r"[^\w\s.,:;*%()\[\]-]", "", text)
429
  return text.lower().strip()
430
 
431
-
432
  import re
433
 
434
  def extract_fields(text):
@@ -531,7 +528,7 @@ elif page == "πŸ“ Clinical Text Notes":
531
  mlp_model_path = "/home/user/app/best_mlp_model_full.pth"
532
  pca_path = "/home/user/app/best_pca_model.pkl"
533
 
534
- best_mlp_model = torch.load(mlp_model_path)
535
  best_mlp_model.to(device)
536
  best_mlp_model.eval()
537
 
 
330
  # Create a formatted string for `top_factors` to be shown in the UI
331
  top_factors = "\n".join([f"- {feat}: {round(value, 2)} impact" for feat, value in top_features])
332
 
 
 
333
  import time
334
  import random
335
  from textwrap import dedent
 
426
  text = re.sub(r"[^\w\s.,:;*%()\[\]-]", "", text)
427
  return text.lower().strip()
428
 
 
429
  import re
430
 
431
  def extract_fields(text):
 
528
  mlp_model_path = "/home/user/app/best_mlp_model_full.pth"
529
  pca_path = "/home/user/app/best_pca_model.pkl"
530
 
531
+ best_mlp_model = torch.load(mlp_model_path, weights_only=False)
532
  best_mlp_model.to(device)
533
  best_mlp_model.eval()
534