Upload inference_intent_type.py with huggingface_hub
Browse files- inference_intent_type.py +4 -1
inference_intent_type.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
import argparse
|
| 2 |
import json
|
| 3 |
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
|
| 7 |
def predict(text: str, confidence_threshold: float | None = None):
|
|
|
|
| 1 |
import argparse
|
| 2 |
import json
|
| 3 |
|
| 4 |
+
try:
|
| 5 |
+
from .model_runtime import get_head # type: ignore
|
| 6 |
+
except ImportError:
|
| 7 |
+
from model_runtime import get_head
|
| 8 |
|
| 9 |
|
| 10 |
def predict(text: str, confidence_threshold: float | None = None):
|