yashzambre commited on
Commit
63dd4ed
·
1 Parent(s): 2942581

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -4
app.py CHANGED
@@ -1,6 +1,23 @@
1
- import gradio as gr
2
 
3
- with gr.Blocks() as demo:
4
- gr.File(file_count='multiple')
 
 
 
5
 
6
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
 
3
+ def process_images(files):
4
+ # Process the uploaded image files here
5
+ # You can access the uploaded files in the 'files' parameter as a list
6
+ # For example, you can loop through the files and perform operations on them
7
+ processed_images = []
8
 
9
+ for file in files:
10
+ # Here, you can perform some image processing on 'file' (e.g., display it, analyze it, etc.)
11
+ # In this example, we'll just return the filenames of the uploaded images.
12
+ processed_images.append(file.name)
13
+
14
+ return processed_images
15
+
16
+ iface = gr.Interface(
17
+ fn=process_images,
18
+ inputs=gr.inputs.File(label="Upload Multiple Images", type="images", multiple=True),
19
+ outputs="text",
20
+ live=True,
21
+ )
22
+
23
+ iface.launch()