MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / token_classification

Function token_classification

bmtools/tools/hugging_tools/api.py:150–152  ·  view source on GitHub ↗
(model_id: str, text: str)

Source from the content-addressed store, hash-verified

148 return str(inference(text))
149 @task
150 def token_classification(model_id: str, text: str) -> str:
151 inference = InferenceApi(repo_id=model_id, token=CONFIG["huggingface"]["token"])
152 return str(inference(text))
153 @task
154 def text2text_generation(model_id: str,text: str) -> str:
155 inference = InferenceApi(repo_id=model_id, token=CONFIG["huggingface"]["token"])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected