Spaces:
Sleeping
Sleeping
Download secciones/model_utils.py from Nacho86/alertDetection: direct link, hf CLI and curl.
- Browser
- Download file 274 Bytes
-
https://huggingface.co/spaces/Nacho86/alertDetection/resolve/main/secciones/model_utils.py
- Command line
-
hf download hf://spaces/Nacho86/alertDetection/secciones/model_utils.py
-
curl -L -o model_utils.py https://huggingface.co/spaces/Nacho86/alertDetection/resolve/main/secciones/model_utils.py
274 Bytes
| import joblib | |
| import streamlit as st | |
| # Cargar el modelo y el vectorizador | |
| def cargar_modelo_y_vectorizador(): | |
| modelo = joblib.load('modelo_nn_g2.pkl') | |
| tfidf_vectorizador = joblib.load('tfidf_vectorizador2.pkl') | |
| return modelo, tfidf_vectorizador | |