(model_id: str, audio_file_name: str)
| 306 | return result |
| 307 | @task |
| 308 | def audio_classification(model_id: str, audio_file_name: str) -> str: |
| 309 | inference = InferenceApi(repo_id=model_id, token=CONFIG["huggingface"]["token"]) |
| 310 | with open(f"{DIRPATH}/{INPUT_PATH}/{audio_file_name}", "rb") as f: |
| 311 | audio = f.read() |
| 312 | response = inference(data=audio, raw_response=True) |
| 313 | result = response.json() |
| 314 | return str(result) |
| 315 | |
| 316 | @tool.get("/model_docs") |
| 317 | @format_docs(str(task_list)) |
nothing calls this directly
no outgoing calls
no test coverage detected