aliabd HF Staff commited on
Commit
537756d
·
verified ·
1 Parent(s): 5a51165

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. requirements.txt +2 -2
  2. run.ipynb +1 -1
  3. run.py +0 -1
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@de997e67c9a7feb9e2eccebf92969366dbd67eba#subdirectory=client/python
2
- https://gradio-builds.s3.amazonaws.com/de997e67c9a7feb9e2eccebf92969366dbd67eba/gradio-4.39.0-py3-none-any.whl
 
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: json_component"]}, {"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", "import numpy as np\n", "\n", "with gr.Blocks() as demo:\n", " inp = gr.JSON(\n", " label=\"InputJSON\",\n", " value={\n", " \"Key 1\": \"Value 1\",\n", " \"Key 2\": {\"Key 3\": \"Value 2\", \"Key 4\": \"Value 3\"},\n", " \"Key 5\": [\"Item 1\", \"Item 2\", \"Item 3\"],\n", " \"Key 6\": 123,\n", " \"Key 7\": 123.456,\n", " \"Key 8\": True,\n", " \"Key 9\": False,\n", " \"Key 10\": None,\n", " \"Key 11\": np.array([1, 2, 3]),\n", " }\n", " )\n", " out = gr.JSON(label=\"OutputJSON\")\n", " btn = gr.Button(\"Submit\")\n", " btn.click(lambda x: x, inp, out)\n", "\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: json_component"]}, {"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", "import numpy as np\n", "\n", "with gr.Blocks() as demo:\n", " inp = gr.JSON(\n", " label=\"InputJSON\",\n", " value={\n", " \"Key 1\": \"Value 1\",\n", " \"Key 2\": {\"Key 3\": \"Value 2\", \"Key 4\": \"Value 3\"},\n", " \"Key 5\": [\"Item 1\", \"Item 2\", \"Item 3\"],\n", " \"Key 6\": 123,\n", " \"Key 7\": 123.456,\n", " \"Key 8\": True,\n", " \"Key 9\": False,\n", " \"Key 10\": None,\n", " \"Key 11\": np.array([1, 2, 3]),\n", " }\n", " )\n", " out = gr.JSON(label=\"OutputJSON\")\n", " btn = gr.Button(\"Submit\")\n", " btn.click(lambda x: x, inp, out)\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -20,6 +20,5 @@ with gr.Blocks() as demo:
20
  btn = gr.Button("Submit")
21
  btn.click(lambda x: x, inp, out)
22
 
23
-
24
  if __name__ == "__main__":
25
  demo.launch()
 
20
  btn = gr.Button("Submit")
21
  btn.click(lambda x: x, inp, out)
22
 
 
23
  if __name__ == "__main__":
24
  demo.launch()