tbitai commited on
Commit
b9d04e8
·
verified ·
1 Parent(s): 5ab9f7f

Remove HF Hub repo constants to enable model linking on hf.co

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -13,14 +13,14 @@ MODELS = [
13
  ("GISTy Enron1 spam", LLM := "gisty-enron1-spam"),
14
  ]
15
 
16
- model_probs_path = hf_hub_download(repo_id=f"tbitai/{BAYES}", filename="probs.json")
17
  with open(model_probs_path) as f:
18
  model_probs = json.load(f)
19
 
20
- nn_model_path = hf_hub_download(repo_id=f"tbitai/{NN}", filename="nn-enron1-spam.keras")
21
  nn_model = tf.keras.models.load_model(nn_model_path)
22
 
23
- llm_model_path = hf_hub_download(repo_id=f"tbitai/{LLM}", filename="gisty-enron1-spam.keras")
24
  llm_model = tf.keras.models.load_model(llm_model_path)
25
  # Sentence Transformers should be imported after Keras models, in order to prevent it from setting Keras to legacy.
26
  from sentence_transformers import SentenceTransformer
 
13
  ("GISTy Enron1 spam", LLM := "gisty-enron1-spam"),
14
  ]
15
 
16
+ model_probs_path = hf_hub_download(repo_id="tbitai/bayes-enron1-spam", filename="probs.json")
17
  with open(model_probs_path) as f:
18
  model_probs = json.load(f)
19
 
20
+ nn_model_path = hf_hub_download(repo_id="tbitai/nn-enron1-spam", filename="nn-enron1-spam.keras")
21
  nn_model = tf.keras.models.load_model(nn_model_path)
22
 
23
+ llm_model_path = hf_hub_download(repo_id="tbitai/gisty-enron1-spam", filename="gisty-enron1-spam.keras")
24
  llm_model = tf.keras.models.load_model(llm_model_path)
25
  # Sentence Transformers should be imported after Keras models, in order to prevent it from setting Keras to legacy.
26
  from sentence_transformers import SentenceTransformer