freddyaboulton HF Staff commited on
Commit
0fe4df3
·
verified ·
1 Parent(s): cb5338a

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +1 -1
  2. requirements.txt +2 -2
  3. run.ipynb +1 -1
  4. run.py +1 -0
README.md CHANGED
@@ -5,7 +5,7 @@ emoji: 🔥
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
8
- sdk_version: 5.49.1
9
  app_file: run.py
10
  pinned: false
11
  hf_oauth: true
 
5
  colorFrom: indigo
6
  colorTo: indigo
7
  sdk: gradio
8
+ sdk_version: 6.0.0
9
  app_file: run.py
10
  pinned: false
11
  hf_oauth: true
requirements.txt CHANGED
@@ -1,2 +1,2 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@e05eb8df38a4ca20993e94ca4e209cf8110bb677#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/e05eb8df38a4ca20993e94ca4e209cf8110bb677/gradio-5.49.1-py3-none-any.whl
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@d007e6cf617baba5c62e49ec2b7ce278aa863a79#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/d007e6cf617baba5c62e49ec2b7ce278aa863a79/gradio-6.0.0-py3-none-any.whl
run.ipynb CHANGED
@@ -1 +1 @@
1
- {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: model3D"]}, {"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", "# get_model3d() returns the file path to sample 3D models included with Gradio\n", "from gradio.media import get_model3d, MEDIA_ROOT\n", "\n", "\n", "def load_mesh(mesh_file_name):\n", " return mesh_file_name\n", "\n", "\n", "demo = gr.Interface(\n", " fn=load_mesh,\n", " inputs=gr.Model3D(label=\"Other name\", display_mode=\"wireframe\"),\n", " outputs=gr.Model3D(\n", " clear_color=(0.0, 0.0, 0.0, 0.0), label=\"3D Model\", display_mode=\"wireframe\"\n", " ),\n", " examples=[\n", " [get_model3d(\"Bunny.obj\")],\n", " [get_model3d(\"Duck.glb\")],\n", " [get_model3d(\"Fox.gltf\")],\n", " [get_model3d(\"face.obj\")],\n", " [get_model3d(\"sofia.stl\")],\n", " [\n", " \"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat\"\n", " ],\n", " [\n", " \"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/luigi/luigi.ply\"\n", " ],\n", " ],\n", " cache_examples=True,\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(allowed_paths=[str(MEDIA_ROOT)])\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
 
1
+ {"cells": [{"cell_type": "markdown", "id": "302934307671667531413257853548643485645", "metadata": {}, "source": ["# Gradio Demo: model3D"]}, {"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", "# get_model3d() returns the file path to sample 3D models included with Gradio\n", "from gradio.media import get_model3d, MEDIA_ROOT\n", "\n", "\n", "def load_mesh(mesh_file_name):\n", " return mesh_file_name\n", "\n", "\n", "demo = gr.Interface(\n", " fn=load_mesh,\n", " inputs=gr.Model3D(label=\"Other name\", display_mode=\"wireframe\"),\n", " outputs=gr.Model3D(\n", " clear_color=(0.0, 0.0, 0.0, 0.0), label=\"3D Model\", display_mode=\"wireframe\"\n", " ),\n", " examples=[\n", " [get_model3d(\"Bunny.obj\")],\n", " [get_model3d(\"Duck.glb\")],\n", " [get_model3d(\"Fox.gltf\")],\n", " [get_model3d(\"face.obj\")],\n", " [get_model3d(\"sofia.stl\")],\n", " [\n", " \"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat\"\n", " ],\n", " [\n", " \"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/luigi/luigi.ply\"\n", " ],\n", " ],\n", " cache_examples=True,\n", " api_name=\"predict\",\n", ")\n", "\n", "if __name__ == \"__main__\":\n", " demo.launch(allowed_paths=[str(MEDIA_ROOT)])\n"]}], "metadata": {}, "nbformat": 4, "nbformat_minor": 5}
run.py CHANGED
@@ -27,6 +27,7 @@ demo = gr.Interface(
27
  ],
28
  ],
29
  cache_examples=True,
 
30
  )
31
 
32
  if __name__ == "__main__":
 
27
  ],
28
  ],
29
  cache_examples=True,
30
+ api_name="predict",
31
  )
32
 
33
  if __name__ == "__main__":