Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|