(model_id: str, image_file_name: str)
| 263 | return str(result) |
| 264 | @task |
| 265 | def image_to_text(model_id: str, image_file_name: str) -> str: |
| 266 | inference = InferenceApi(repo_id=model_id, token=CONFIG["huggingface"]["token"]) |
| 267 | img_data = image_to_bytes(f"{DIRPATH}/{INPUT_PATH}/{image_file_name}") |
| 268 | result = inference(data=img_data) |
| 269 | return str(result) |
| 270 | # AUDIO tasks |
| 271 | @task |
| 272 | def text_to_speech(model_id: str, text: str) -> str: |
nothing calls this directly
no test coverage detected