Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
5697c79
1
Parent(s):
0da0703
Use gr.File instead of gr.Files for a better experience on mobile phones
Browse filesHello! There is a bug in gradio where the `file_types` parameter is not working with `gr.Files`. See (https://github.com/gradio-app/gradio/issues/7137). While I fix it in gradio, this PR should fix it in your demo. `gr.File(file_count="multiple")` is the same as `gr.Files`.
app.py
CHANGED
@@ -198,9 +198,10 @@ with gr.Blocks(css=css) as demo:
|
|
198 |
# )
|
199 |
with gr.Row():
|
200 |
with gr.Column():
|
201 |
-
files = gr.
|
202 |
label="Drag (Select) 1 or more photos of your face",
|
203 |
-
file_types=["image"]
|
|
|
204 |
)
|
205 |
uploaded_files = gr.Gallery(label="Your images", visible=False, columns=5, rows=1, height=200)
|
206 |
with gr.Column(visible=False) as clear_button:
|
|
|
198 |
# )
|
199 |
with gr.Row():
|
200 |
with gr.Column():
|
201 |
+
files = gr.File(
|
202 |
label="Drag (Select) 1 or more photos of your face",
|
203 |
+
file_types=["image"],
|
204 |
+
file_count="multiple"
|
205 |
)
|
206 |
uploaded_files = gr.Gallery(label="Your images", visible=False, columns=5, rows=1, height=200)
|
207 |
with gr.Column(visible=False) as clear_button:
|