Upload folder using huggingface_hub
Browse files- requirements.txt +2 -2
- run.ipynb +1 -1
- run.py +1 -2
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
gradio-client @ git+https://github.com/gradio-app/gradio@
|
2 |
-
https://gradio-builds.s3.amazonaws.com/
|
|
|
1 |
+
gradio-client @ git+https://github.com/gradio-app/gradio@9b42ba8f1006c05d60a62450d3036ce0d6784f86#subdirectory=client/python
|
2 |
+
https://gradio-builds.s3.amazonaws.com/9b42ba8f1006c05d60a62450d3036ce0d6784f86/gradio-4.39.0-py3-none-any.whl
|
run.ipynb
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: upload_file_limit_test"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\"\"\"\n", " # \u2b06\ufe0f\ud83d\udcc1 max_file_size test\n", " The demo has a max file size of 15kb. The error modal should pop up when a file larger than that is uploaded. \n", " \"\"\")\n", " with gr.Row():\n", " with gr.Column():\n", " gr.Image(label=\"Image\", interactive=True)\n", " gr.Gallery(label=\"Gallery\", interactive=True)\n", " gr.File(label=\"Single File\", interactive=True, file_count=\"single\")\n", " with gr.Column():\n", " gr.Model3D(label=\"Model 3D\", interactive=True,)\n", " gr.MultimodalTextbox(label=\"Multimodal Textbox\", interactive=True)\n", " gr.UploadButton(label=\"Upload Button\", interactive=True)\n", " with gr.Column():\n", " gr.Video(label=\"Video\", interactive=True)\n", " gr.Audio(label=\"Audio\", interactive=True)\n", " gr.File(label=\"Multiple Files\", interactive=True, file_count=\"multiple\")\n", "\n", "
|
|
|
1 |
+
{"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: upload_file_limit_test"]}, {"cell_type": "code", "execution_count": null, "id": "272996653310673477252411125948039410165", "metadata": {}, "outputs": [], "source": ["!pip install -q gradio "]}, {"cell_type": "code", "execution_count": null, "id": "288918539441861185822528903084949547379", "metadata": {}, "outputs": [], "source": ["import gradio as gr\n", "\n", "with gr.Blocks() as demo:\n", " gr.Markdown(\"\"\"\n", " # \u2b06\ufe0f\ud83d\udcc1 max_file_size test\n", " The demo has a max file size of 15kb. The error modal should pop up when a file larger than that is uploaded. \n", " \"\"\")\n", " with gr.Row():\n", " with gr.Column():\n", " gr.Image(label=\"Image\", interactive=True)\n", " gr.Gallery(label=\"Gallery\", interactive=True)\n", " gr.File(label=\"Single File\", interactive=True, file_count=\"single\")\n", " with gr.Column():\n", " gr.Model3D(label=\"Model 3D\", interactive=True,)\n", " gr.MultimodalTextbox(label=\"Multimodal Textbox\", interactive=True)\n", " gr.UploadButton(label=\"Upload Button\", interactive=True)\n", " with gr.Column():\n", " gr.Video(label=\"Video\", interactive=True)\n", " gr.Audio(label=\"Audio\", interactive=True)\n", " gr.File(label=\"Multiple Files\", interactive=True, file_count=\"multiple\")\n", "\n", "if __name__ == \"__main__\":\n", " # The upload limit is set in playwright_setup.js\n", " # since the e2e tests use mount_gradio_app\n", " demo.launch(max_file_size=\"15kb\")\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
|
run.py
CHANGED
@@ -19,8 +19,7 @@ with gr.Blocks() as demo:
|
|
19 |
gr.Audio(label="Audio", interactive=True)
|
20 |
gr.File(label="Multiple Files", interactive=True, file_count="multiple")
|
21 |
|
22 |
-
|
23 |
if __name__ == "__main__":
|
24 |
# The upload limit is set in playwright_setup.js
|
25 |
# since the e2e tests use mount_gradio_app
|
26 |
-
demo.launch(max_file_size="15kb")
|
|
|
19 |
gr.Audio(label="Audio", interactive=True)
|
20 |
gr.File(label="Multiple Files", interactive=True, file_count="multiple")
|
21 |
|
|
|
22 |
if __name__ == "__main__":
|
23 |
# The upload limit is set in playwright_setup.js
|
24 |
# since the e2e tests use mount_gradio_app
|
25 |
+
demo.launch(max_file_size="15kb")
|