Instructions to use Danswer/intent-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use Danswer/intent-model with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://Danswer/intent-model") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -59,8 +59,8 @@ from transformers import AutoTokenizer
|
|
| 59 |
from transformers import TFDistilBertForSequenceClassification
|
| 60 |
import tensorflow as tf
|
| 61 |
|
| 62 |
-
model = TFDistilBertForSequenceClassification.from_pretrained("danswer/intent-model
|
| 63 |
-
tokenizer = AutoTokenizer.from_pretrained("danswer/intent-model
|
| 64 |
|
| 65 |
class_semantic_mapping = {
|
| 66 |
0: "Keyword Search",
|
|
|
|
| 59 |
from transformers import TFDistilBertForSequenceClassification
|
| 60 |
import tensorflow as tf
|
| 61 |
|
| 62 |
+
model = TFDistilBertForSequenceClassification.from_pretrained("danswer/intent-model")
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained("danswer/intent-model")
|
| 64 |
|
| 65 |
class_semantic_mapping = {
|
| 66 |
0: "Keyword Search",
|