HFAgentsCourse / Utils /open_file_bytes.py
Alessio-Chiovelli's picture
Audio summarization tools enabled
4d25efb
raw
history blame contribute delete
313 Bytes
def open_file_bytes(file_path: str) -> bytes:
"""
Opens a file and returns its content as bytes.
Args:
file_path (str): The path to the file to be opened.
Returns:
bytes: The content of the file as bytes.
"""
with open(file_path, 'rb') as file:
return file.read()