cog predict does not download a file if I explicitly write the extension in the name of the output Path (I am under Mac OS).
Example:
Inside predict function:
output_path = Path(tempfile.mkdtemp()) / "output.txt"
with open(str(output_path), "w") as f:
f.write("hello")
return output_path
This only prints the file's content on the terminal and does not download it.
But if I remove the ".txt" from the filename the download works, but the file is a .bin and it does not contain the text.
cog predict does not download a file if I explicitly write the extension in the name of the output Path (I am under Mac OS).
Example:
This only prints the file's content on the terminal and does not download it.
But if I remove the ".txt" from the filename the download works, but the file is a .bin and it does not contain the text.