-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradio 5 error - Gradio 4 works - to the gradio cache dir because it was not created by the application #9809
Comments
Hi @FurkanGozukara, did you try the suggestion in the error above?
For security reasons, we've made Gradio less able to access arbitrary files on your computer unless you specifically add those files as part of the See: #9463 |
@abidlabs can you tell me what to do i am confused i dont want to change behavior of the app how to because users can pick any folder the app works like this - Gradio 4 works installed into : G:\Image_Caption_Editor_v8 so i need to edit user given folder and generate a txt file there, modify txt files there |
The idea is that you need to add |
then practically this app is unusable with Gradio 5 because what this app does is, user picks a folder and easily edit generate captions - any folder because i can't know which drive they are going to install the app on, maybe i can add all drive letters? like C D E F G R :D |
Ah okay so this is generally an insecure construction -- if you deploy this app anywhere, a user of the app will be able to access and run commands across any files in your filesystem. If you are 100% sure that this Gradio app is only going to run locally, and you're willing to risk it, yeah you could just add all of the Windows drive letters or check their existence programmatically, something like: import string
from pathlib import Path
def get_drives():
return [f"{d}:" for d in string.ascii_uppercase if Path(f"{d}:").exists()] and then add them to the |
Will go ahead and close this but let us know if you have any further questions. |
@abidlabs i start app like this with bat file how it is gonna work
|
You can put the code directly in python app.py before you launch it |
Describe the bug
The error happens here
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: