aliabd HF staff commited on
Commit
866666d
·
verified ·
1 Parent(s): 3c5ea9a

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 -2
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: zip_to_json"]}, {"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": ["from zipfile import ZipFile\n", "\n", "import gradio as gr\n", "\n", "\n", "def zip_to_json(file_obj):\n", " files = []\n", " with ZipFile(file_obj.name) as zfile:\n", " for zinfo in zfile.infolist():\n", " files.append(\n", " {\n", " \"name\": zinfo.filename,\n", " \"file_size\": zinfo.file_size,\n", " \"compressed_size\": zinfo.compress_size,\n", " }\n", " )\n", " return files\n", "\n", "\n", "demo = gr.Interface(zip_to_json, \"file\", \"json\")\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: zip_to_json"]}, {"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": ["from zipfile import ZipFile\n", "\n", "import gradio as gr\n", "\n", "def zip_to_json(file_obj):\n", " files = []\n", " with ZipFile(file_obj.name) as zfile:\n", " for zinfo in zfile.infolist():\n", " files.append(\n", " {\n", " \"name\": zinfo.filename,\n", " \"file_size\": zinfo.file_size,\n", " \"compressed_size\": zinfo.compress_size,\n", " }\n", " )\n", " return files\n", "\n", "demo = gr.Interface(zip_to_json, \"file\", \"json\")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch()\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -2,7 +2,6 @@ from zipfile import ZipFile
2
 
3
  import gradio as gr
4
 
5
-
6
  def zip_to_json(file_obj):
7
  files = []
8
  with ZipFile(file_obj.name) as zfile:
@@ -16,7 +15,6 @@ def zip_to_json(file_obj):
16
  )
17
  return files
18
 
19
-
20
  demo = gr.Interface(zip_to_json, "file", "json")
21
 
22
  if __name__ == "__main__":
 
2
 
3
  import gradio as gr
4
 
 
5
  def zip_to_json(file_obj):
6
  files = []
7
  with ZipFile(file_obj.name) as zfile:
 
15
  )
16
  return files
17
 
 
18
  demo = gr.Interface(zip_to_json, "file", "json")
19
 
20
  if __name__ == "__main__":