Spaces:
Sleeping
Sleeping
Remove HF Hub repo constants to enable model linking on hf.co
Browse files
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=
|
17 |
with open(model_probs_path) as f:
|
18 |
model_probs = json.load(f)
|
19 |
|
20 |
-
nn_model_path = hf_hub_download(repo_id=
|
21 |
nn_model = tf.keras.models.load_model(nn_model_path)
|
22 |
|
23 |
-
llm_model_path = hf_hub_download(repo_id=
|
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
|