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