Kilos1 commited on
Commit
40a0ff9
Β·
verified Β·
1 Parent(s): 73a45fe

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -1
app.py DELETED
@@ -1 +0,0 @@
1
- {"cells":[{"cell_type":"markdown","id":"302934307671667531413257853548643485645","metadata":{"id":"302934307671667531413257853548643485645"},"source":["# Gradio Demo: model3D"]},{"cell_type":"code","execution_count":1,"id":"272996653310673477252411125948039410165","metadata":{"id":"272996653310673477252411125948039410165","colab":{"base_uri":"https://localhost:8080/"},"collapsed":true,"executionInfo":{"status":"ok","timestamp":1719675154488,"user_tz":-120,"elapsed":24996,"user":{"displayName":"KGAOGELO Moloko","userId":"02299502165535871727"}},"outputId":"e537a76f-c2ae-4ef0-dee2-e513bf6a52a6"},"outputs":[{"output_type":"stream","name":"stdout","text":["\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.3/12.3 MB\u001b[0m \u001b[31m31.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m92.0/92.0 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m318.2/318.2 kB\u001b[0m \u001b[31m14.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m5.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m145.0/145.0 kB\u001b[0m \u001b[31m6.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m10.1/10.1 MB\u001b[0m \u001b[31m59.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.4/62.4 kB\u001b[0m \u001b[31m6.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.9/129.9 kB\u001b[0m \u001b[31m14.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m9.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m6.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m71.9/71.9 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m53.6/53.6 kB\u001b[0m \u001b[31m5.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m307.7/307.7 kB\u001b[0m \u001b[31m27.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m341.4/341.4 kB\u001b[0m \u001b[31m31.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.4/3.4 MB\u001b[0m \u001b[31m64.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m57.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h Building wheel for ffmpy (setup.py) ... \u001b[?25l\u001b[?25hdone\n"]}],"source":["!pip install -q gradio"]},{"cell_type":"code","execution_count":2,"id":"288918539441861185822528903084949547379","metadata":{"id":"288918539441861185822528903084949547379","executionInfo":{"status":"ok","timestamp":1719675170090,"user_tz":-120,"elapsed":3108,"user":{"displayName":"KGAOGELO Moloko","userId":"02299502165535871727"}}},"outputs":[],"source":["# Downloading files from the demo repo\n","import os\n","os.mkdir('files')\n","!wget -q -O files/Bunny.obj https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/Bunny.obj\n","!wget -q -O files/Duck.glb https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/Duck.glb\n","!wget -q -O files/Fox.gltf https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/Fox.gltf\n","!wget -q -O files/face.obj https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/face.obj\n","!wget -q -O files/sofia.stl https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/sofia.stl\n","!wget -q -O files/source.txt https://github.com/gradio-app/gradio/raw/main/demo/model3D/files/source.txt"]},{"cell_type":"code","execution_count":3,"id":"44380577570523278879349135829904343037","metadata":{"id":"44380577570523278879349135829904343037","colab":{"base_uri":"https://localhost:8080/","height":785},"executionInfo":{"status":"ok","timestamp":1719675180900,"user_tz":-120,"elapsed":7067,"user":{"displayName":"KGAOGELO Moloko","userId":"02299502165535871727"}},"outputId":"b579b077-a6bd-4b9c-a03f-a525b86b22f7"},"outputs":[{"output_type":"stream","name":"stdout","text":["Caching examples at: '/content/gradio_cached_examples/12'\n","Caching example 1/7\n","Caching example 2/7\n","Caching example 3/7\n","Caching example 4/7\n","Caching example 5/7\n","Caching example 6/7\n","Caching example 7/7\n","Setting queue=True in a Colab notebook requires sharing enabled. Setting `share=True` (you can turn this off by setting `share=False` in `launch()` explicitly).\n","\n","Colab notebook detected. To show errors in colab notebook, set debug=True in launch()\n","Running on public URL: https://9d54bce2b623162778.gradio.live\n","\n","This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run `gradio deploy` from Terminal to deploy to Spaces (https://huggingface.co/spaces)\n"]},{"output_type":"display_data","data":{"text/plain":["<IPython.core.display.HTML object>"],"text/html":["<div><iframe src=\"https://9d54bce2b623162778.gradio.live\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"]},"metadata":{}}],"source":["import gradio as gr\n","import os\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(),\n"," outputs=gr.Model3D(\n"," clear_color=[0.0, 0.0, 0.0, 0.0], label=\"3D Model\"),\n"," examples=[\n"," [os.path.join(os.path.abspath(''), \"files/Bunny.obj\")],\n"," [os.path.join(os.path.abspath(''), \"files/Duck.glb\")],\n"," [os.path.join(os.path.abspath(''), \"files/Fox.gltf\")],\n"," [os.path.join(os.path.abspath(''), \"files/face.obj\")],\n"," [os.path.join(os.path.abspath(''), \"files/sofia.stl\")],\n"," [\"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k-mini.splat\"],\n"," [\"https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/luigi/luigi.ply\"],\n"," ],\n"," cache_examples=True\n",")\n","\n","if __name__ == \"__main__\":\n"," demo.launch()\n"]}],"metadata":{"colab":{"provenance":[{"file_id":"https://huggingface.co/spaces/gradio/model3D/blob/main/run.ipynb","timestamp":1719675073950}]},"language_info":{"name":"python"},"kernelspec":{"name":"python3","display_name":"Python 3"}},"nbformat":4,"nbformat_minor":5}