Spaces:
Runtime error
Runtime error
Update src/components/model_nlp_intent.py
Browse files
src/components/model_nlp_intent.py
CHANGED
|
@@ -128,14 +128,14 @@ def main():
|
|
| 128 |
def predict_intent(text: str) -> dict:
|
| 129 |
|
| 130 |
model = TFDistilBertForSequenceClassification.from_pretrained(
|
| 131 |
-
"samithcs/nlp_intent_model", from_tf=True
|
| 132 |
)
|
| 133 |
tokenizer = DistilBertTokenizer.from_pretrained(
|
| 134 |
-
"samithcs/nlp_intent_model"
|
| 135 |
)
|
| 136 |
|
| 137 |
|
| 138 |
-
label_url = "https://huggingface.co/samithcs/nlp_intent_model/
|
| 139 |
response = requests.get(label_url)
|
| 140 |
label_encoder = joblib.load(BytesIO(response.content))
|
| 141 |
|
|
|
|
| 128 |
def predict_intent(text: str) -> dict:
|
| 129 |
|
| 130 |
model = TFDistilBertForSequenceClassification.from_pretrained(
|
| 131 |
+
"samithcs/nlp_intent_model/nlp_intent/intent_model", from_tf=True
|
| 132 |
)
|
| 133 |
tokenizer = DistilBertTokenizer.from_pretrained(
|
| 134 |
+
"samithcs/nlp_intent_model/nlp_intent/intent_tokenizer"
|
| 135 |
)
|
| 136 |
|
| 137 |
|
| 138 |
+
label_url = "https://huggingface.co/samithcs/nlp_intent_model/tree/main/nlp_intent/label_encoder.joblib"
|
| 139 |
response = requests.get(label_url)
|
| 140 |
label_encoder = joblib.load(BytesIO(response.content))
|
| 141 |
|