New ask Hacker News story: Ask HN: How to access files in /tmp in a HF space (GUI)?
Ask HN: How to access files in /tmp in a HF space (GUI)?
2 by spacetimeuser5 | 1 comments on Hacker News.
I'm building a simple ML python app with Gradio on a Huggingface space. My main function should return a .txt file (actuallly - file.name which is a path to file) filled with text using a tempfile module. The "outputs" parameter in gradio.Interface is set to "textbox". After the compeltion of the processing there is "/tmp/tmp0m22k8nw.txt" displayed in the outputs textbox in the app. How can I access this .txt file in the HF space? HF spaces seem not to have access to file system?
2 by spacetimeuser5 | 1 comments on Hacker News.
I'm building a simple ML python app with Gradio on a Huggingface space. My main function should return a .txt file (actuallly - file.name which is a path to file) filled with text using a tempfile module. The "outputs" parameter in gradio.Interface is set to "textbox". After the compeltion of the processing there is "/tmp/tmp0m22k8nw.txt" displayed in the outputs textbox in the app. How can I access this .txt file in the HF space? HF spaces seem not to have access to file system?
Comments
Post a Comment