aliabd HF Staff commited on
Commit
d14d86a
·
verified ·
1 Parent(s): d5c74d1

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. run.ipynb +1 -1
  2. run.py +1 -2
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", "\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\")"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
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")