You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Statement
The general flow is a user can upload a series of images they would like to analyze or transform, select an image to do the analysis on, and then preform the analysis using Panel.
I'm using the file_input = pn.widgets.FileInput() to input files and = pn.widgets.FileSelector(nameofdir) to allow the selection of images to be analyzed using panel. However, I'm noticing the pn.widgets.FileSelector() doesn't update the available files unless you refresh the browser.
Additionally, the FileSelector() Widget has a method self._update_files() is called in response certain events, such as pressing the down arrow. You can force a refresh without reloading the browser. The only issue I have with using the UI to force the update is if you explicitly define a directory, without any children folders inside that directory, those buttons are basically disabled.
Desired Solution
Add a periodic callback to watch the directory for any changes.
Alternative Solution
A refresh button that can refresh the directory and display any new changes
The text was updated successfully, but these errors were encountered:
Thanks @tlmille2, very reasonable suggestions. I'll implement both, one question I have though, what did you do to get that layout for the FileSelector, it should really look like this:
@philippjfr - Appending the FileSelector in a bootstrap.main template (see below). I filtered out a large chunk of variable names.
I'm going to open another ticket about FileSelector not behaving it's margins when applied to the bootstrap template. I'm trying to diagnose it's cause, but I think it's a css issue.
Problem Statement
The general flow is a user can upload a series of images they would like to analyze or transform, select an image to do the analysis on, and then preform the analysis using Panel.
I'm using the
file_input = pn.widgets.FileInput()
to input files and= pn.widgets.FileSelector(nameofdir)
to allow the selection of images to be analyzed using panel. However, I'm noticing thepn.widgets.FileSelector()
doesn't update the available files unless you refresh the browser.Additionally, the FileSelector() Widget has a method self._update_files() is called in response certain events, such as pressing the down arrow. You can force a refresh without reloading the browser. The only issue I have with using the UI to force the update is if you explicitly define a directory, without any children folders inside that directory, those buttons are basically disabled.
Desired Solution
Add a periodic callback to watch the directory for any changes.
Alternative Solution
A refresh button that can refresh the directory and display any new changes
The text was updated successfully, but these errors were encountered: