BraydenAC commited on
Commit
a671e05
Β·
verified Β·
1 Parent(s): 381549b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -17,7 +17,13 @@ nltk.download('stopwords')
17
  stop_words = set(stopwords.words('english'))
18
  nlp = spacy.load('en_core_web_sm')
19
 
20
- model = tf.keras.models.load_model("path_to_your_model/my_keras_model")
 
 
 
 
 
 
21
 
22
  def preprocess_text(text):
23
  text = re.sub(r'[^a-zA-Z0-9\s]', '', text) # Only remove non-alphanumeric characters except spaces
 
17
  stop_words = set(stopwords.words('english'))
18
  nlp = spacy.load('en_core_web_sm')
19
 
20
+ # Available backend options are: "jax", "torch", "tensorflow".
21
+ import os
22
+ os.environ["KERAS_BACKEND"] = "jax"
23
+
24
+ import keras
25
+
26
+ model = keras.saving.load_model("hf://ARI-HIPA-AI-Team/keras_model")
27
 
28
  def preprocess_text(text):
29
  text = re.sub(r'[^a-zA-Z0-9\s]', '', text) # Only remove non-alphanumeric characters except spaces