how to add or download files and folders in/from the space
hi i have a certain python files and folders that i wants to add into the huggingface space project… does any one has any idea how to add or import them into the project space cause i don’t find any of the option to do so.
And even please guide where & how to download or export the python files created here for the same.
actually I wants to import/upload a files&folders to my particular space & wants to refernce those & use in the app.
But i can’t find any usefull interface here to import, export, selecting or deleting any files here.
secondly… yes wants to clone or download particular folder to huggingface from available github repository… that i thing is not available.
i can’t even find cmd line tool interface here too. so help me with that too.
Like as in with web upload file option i uploaded a zip file now i wants to extract those files and folders in it but than that’s not possible as such interface not possible.
next is doesn’t have a terminal option available to unzip.
pardon me here im new to this… so this ltl queries gets arising.
You are correct that there is not currently a command line interface for the machine running your space.
If you need to do some “setup” actions in your space, you can do that in the app.py file prior to when you define and launch your gradio app.
So something like
import gradio as gr
download_and_extract_zip_file()
clone_github_repository()
with gr.Blocks() as demo:
...application code goes here ...
demo.launch()
The download_and_extract_zip_file() and clone_github_repository() code will only run once.
So you’re basically limited to what you can do with python.
Here are some resources I found that could help you get started:
I could see many projects in here having multiple folders and files created and commited at once. may i know how are they doing so. what importing machanisms are they applying.
Does this huggingface has repository in github if its so than how to access them. is it the same credentials created in here applies there too
if i set torch_dtype=torch.float16,
thn it throws
RuntimeError: expected scalar type Float but found BFloat16
if i set torch_dtype=torch.bfloat16,
thn it throws
RuntimeError: expected scalar type BFloat16 but found Float,
if i set torch_dtype=torch.half,
thn it throws
RuntimeError: “LayerNormKernelImpl” not implemented for ‘Half’
if i set torch_dtype=torch.double,
thn it throws
RuntimeError: expected scalar type BFloat16 but found Double
if i set torch_dtype=torch.long,
thn it throws
raise TypeError('nn.Module.to only accepts floating point or complex ’
TypeError: nn.Module.to only accepts floating point or complex dtypes, but got desired dtype=torch.int64
so i am really confused on what torch_dtype to use for successful run.
Hello @nightfury,
I have the same problem, that is I have no idea how to upload my folder/files to the HuggingFace Space. If you solved this problem, could you please help me?
hey there i think you have to push to create a folder from the github. And for files they have provided an option now to upload one/multiple. some times it fails to upload multiple files of size more than 1mb so may have to try to upload one individually.