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

Function text_generation

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

Source from the content-addressed store, hash-verified

173 return str(inference(input))
174 @task
175 def text_generation(model_id: str, text: str) -> str:
176 inference = InferenceApi(repo_id=model_id, token=CONFIG["huggingface"]["token"])
177 return str(inference(text))
178 # CV tasks
179 @task
180 def visual_question_answering(model_id: str, image_file_name: str, text: str) -> str:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected