Comments (1)
Hi @stunlocked1 when file_count="directory"
, the Python function receives a list of files, so you need to handle a list in your functions. This works for me:
import gradio as gr
def test(folderobj):
print([f.name for f in folderobj])
with gr.Blocks() as interface:
folderobj = gr.Files(file_count="directory", type="filepath") # type:ignore
folderobj.change(test, folderobj)
if __name__ == "__main__":
interface.launch()
from gradio.
Related Issues (20)
- How to support carriage return sending in the textbox component
- How to support carriage return sending in the textbox component
- Status of CVE-2023-41626? / Security contact e-mail not working? HOT 7
- How to access local image and css files in gradio.HTML HOT 4
- How can I manually change the value of a control? HOT 4
- support websockets 12.0 HOT 1
- Text color of gr.Examples is invisible with gr.themes.Monochrome HOT 3
- Gradio State objects hang the Gradio App HOT 4
- "UserWarning: LoginButton created outside of a Blocks context." is always shown HOT 4
- How to custom footer of gradio app? HOT 2
- RuntimeError: Response content shorter than Content-Length HOT 2
- blocks close will raise error HOT 1
- Gradio Lite: iterative output loads and shows everything at once
- Add delete or remove event to `gr.File` HOT 2
- `HighlightedText` can not show text without inline category label HOT 1
- Feature Request: Client loading a Space that requires user login as an API
- Feature request: features to enable custom preprocessing functions in Examples component HOT 1
- When the gradio_client is used to call the API, the uploaded image will always be renamed image.webp HOT 5
- JSON component incorrectly handling dicts/strings with 'path' key HOT 2
- Long-running tasks require open connection, looking for polling solution HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradio.