gradio-litmodel3d


Namegradio-litmodel3d JSON
Version 0.0.1 PyPI version JSON
download
home_pageNone
SummaryAn improved Model3D component with environment map support
upload_time2024-05-22 12:18:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords 3d env map environment map gradio-custom-component gradio-template-model3d illumination light model model 3d
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ---
tags: [gradio-custom-component, Model3D, model 3d, 3d, model, illumination, light, environment map, env map]
title: gradio_litmodel3d
short_description: An improved Model3D component with environment map support
colorFrom: blue
colorTo: yellow
sdk: gradio
pinned: false
app_file: space.py
---

# `gradio_litmodel3d`
<img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">  

An improved Model3D component with environment map support

## Installation

```bash
pip install gradio_litmodel3d
```

## Usage

```python

import gradio as gr
from gradio_litmodel3d import LitModel3D

# print gradio version
print(gr.__version__)

def update_hdr(hdr_upload):
    return gr.update(env_map=hdr_upload.name if hdr_upload else None)

with gr.Blocks() as demo:
    env_map = gr.File(label="HDR Environment Map", file_types=[".hdr"], file_count="single")
    modelupload = gr.File(label="3D Model", file_types=[".obj", ".gltf", ".glb"])
    model3d = LitModel3D(interactive=False)

    tonemapping = gr.Radio(
        value="standard",
        label="Tonemapping",
        choices=["standard", "aces"],
    )
    exposure = gr.Slider(
        value=1.0,
        label="Exposure",
        minimum=0.1,
        maximum=5.0, 
        step=0.1,
    )
    contrast = gr.Slider(
        value=1.0,
        label="Contrast",
        minimum=0.1,
        maximum=2.0, 
        step=0.1,
    )
    tonemapping.change(
        lambda tonemapping: gr.update(tonemapping=tonemapping),
        inputs=[tonemapping],
        outputs=[model3d],
    )
    exposure.change(
        lambda exposure: gr.update(exposure=exposure),
        inputs=[exposure],
        outputs=[model3d],
    )
    contrast.change(
        lambda contrast: gr.update(contrast=contrast),
        inputs=[contrast],
        outputs=[model3d],
    )

    modelupload.change(
        lambda model_upload: gr.update(value=model_upload),
        inputs=[modelupload],
        outputs=[model3d],
    )
    env_map.change(
        update_hdr,
        inputs=[env_map],
        outputs=[model3d],
    )


if __name__ == "__main__":
    demo.launch()

```

## `LitModel3D`

### Initialization

<table>
<thead>
<tr>
<th align="left">name</th>
<th align="left" style="width: 25%;">type</th>
<th align="left">default</th>
<th align="left">description</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left"><code>value</code></td>
<td align="left" style="width: 25%;">

```python
str | Callable | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">path to (.obj, .glb, .stl, .gltf, .splat, or .ply) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component.</td>
</tr>

<tr>
<td align="left"><code>env_map</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">path to environment map file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the environment map.</td>
</tr>

<tr>
<td align="left"><code>tonemapping</code></td>
<td align="left" style="width: 25%;">

```python
Literal["standard", "aces"] | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">tonemapping algorithm to use for rendering the scene. Should be one of "standard" or "aces". If not provided, defaults to "standard".</td>
</tr>

<tr>
<td align="left"><code>exposure</code></td>
<td align="left" style="width: 25%;">

```python
float
```

</td>
<td align="left"><code>1.0</code></td>
<td align="left">exposure value to use for rendering the scene. Should be a float, increase this value to make the scene brighter, decrease to make it darker. Affects the exposure property of the camera.</td>
</tr>

<tr>
<td align="left"><code>contrast</code></td>
<td align="left" style="width: 25%;">

```python
float
```

</td>
<td align="left"><code>1.0</code></td>
<td align="left">contrast value to use for rendering the scene. Should be a float, increase this value to make the scene more contrasted, decrease to make it less contrasted. Affects the contrast property of the camera.</td>
</tr>

<tr>
<td align="left"><code>clear_color</code></td>
<td align="left" style="width: 25%;">

```python
tuple[float, float, float, float] | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">background color of scene, should be a tuple of 4 floats between 0 and 1 representing RGBA values.</td>
</tr>

<tr>
<td align="left"><code>camera_position</code></td>
<td align="left" style="width: 25%;">

```python
tuple[
    int | float | None,
    int | float | None,
    int | float | None,
]
```

</td>
<td align="left"><code>None, None, None</code></td>
<td align="left">initial camera position of scene, provided as a tuple of `(alpha, beta, radius)`. Each value is optional. If provided, `alpha` and `beta` should be in degrees reflecting the angular position along the longitudinal and latitudinal axes, respectively. Radius corresponds to the distance from the center of the object to the camera.</td>
</tr>

<tr>
<td align="left"><code>zoom_speed</code></td>
<td align="left" style="width: 25%;">

```python
float
```

</td>
<td align="left"><code>1</code></td>
<td align="left">the speed of zooming in and out of the scene when the cursor wheel is rotated or when screen is pinched on a mobile device. Should be a positive float, increase this value to make zooming faster, decrease to make it slower. Affects the wheelPrecision property of the camera.</td>
</tr>

<tr>
<td align="left"><code>pan_speed</code></td>
<td align="left" style="width: 25%;">

```python
float
```

</td>
<td align="left"><code>1</code></td>
<td align="left">the speed of panning the scene when the cursor is dragged or when the screen is dragged on a mobile device. Should be a positive float, increase this value to make panning faster, decrease to make it slower. Affects the panSensibility property of the camera.</td>
</tr>

<tr>
<td align="left"><code>height</code></td>
<td align="left" style="width: 25%;">

```python
int | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">The height of the model3D component, specified in pixels if a number is passed, or in CSS units if a string is passed.</td>
</tr>

<tr>
<td align="left"><code>label</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.</td>
</tr>

<tr>
<td align="left"><code>show_label</code></td>
<td align="left" style="width: 25%;">

```python
bool | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">if True, will display label.</td>
</tr>

<tr>
<td align="left"><code>every</code></td>
<td align="left" style="width: 25%;">

```python
float | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.</td>
</tr>

<tr>
<td align="left"><code>container</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">If True, will place the component in a container - providing some extra padding around the border.</td>
</tr>

<tr>
<td align="left"><code>scale</code></td>
<td align="left" style="width: 25%;">

```python
int | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.</td>
</tr>

<tr>
<td align="left"><code>min_width</code></td>
<td align="left" style="width: 25%;">

```python
int
```

</td>
<td align="left"><code>160</code></td>
<td align="left">minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.</td>
</tr>

<tr>
<td align="left"><code>interactive</code></td>
<td align="left" style="width: 25%;">

```python
bool | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output.</td>
</tr>

<tr>
<td align="left"><code>visible</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">If False, component will be hidden.</td>
</tr>

<tr>
<td align="left"><code>elem_id</code></td>
<td align="left" style="width: 25%;">

```python
str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.</td>
</tr>

<tr>
<td align="left"><code>elem_classes</code></td>
<td align="left" style="width: 25%;">

```python
list[str] | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.</td>
</tr>

<tr>
<td align="left"><code>render</code></td>
<td align="left" style="width: 25%;">

```python
bool
```

</td>
<td align="left"><code>True</code></td>
<td align="left">If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.</td>
</tr>

<tr>
<td align="left"><code>key</code></td>
<td align="left" style="width: 25%;">

```python
int | str | None
```

</td>
<td align="left"><code>None</code></td>
<td align="left">if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved.</td>
</tr>
</tbody></table>


### Events

| name | description |
|:-----|:------------|
| `change` | Triggered when the value of the LitModel3D changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |
| `upload` | This listener is triggered when the user uploads a file into the LitModel3D. |
| `edit` | This listener is triggered when the user edits the LitModel3D (e.g. image) using the built-in editor. |
| `clear` | This listener is triggered when the user clears the LitModel3D using the X button for the component. |



### User function

The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).

- When used as an Input, the component only impacts the input signature of the user function.
- When used as an output, the component only impacts the return signature of the user function.

The code snippet below is accurate in cases where the component is used as both an input and an output.

- **As output:** Is passed, passes the uploaded file as a {str} filepath to the function.
- **As input:** Should return, expects function to return a {str} or {pathlib.Path} filepath of type (.obj, .glb, .stl, or .gltf).

 ```python
 def predict(
     value: str | None
 ) -> str | Path | None:
     return value
 ```
 

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "gradio-litmodel3d",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "3d, env map, environment map, gradio-custom-component, gradio-template-Model3D, illumination, light, model, model 3d",
    "author": null,
    "author_email": "Mark Boss <hello@markboss.me>",
    "download_url": "https://files.pythonhosted.org/packages/77/50/103047eab2fcd5d86d62142083035c2d585afdc3bbd7edf36ae1151c7b65/gradio_litmodel3d-0.0.1.tar.gz",
    "platform": null,
    "description": "---\ntags: [gradio-custom-component, Model3D, model 3d, 3d, model, illumination, light, environment map, env map]\ntitle: gradio_litmodel3d\nshort_description: An improved Model3D component with environment map support\ncolorFrom: blue\ncolorTo: yellow\nsdk: gradio\npinned: false\napp_file: space.py\n---\n\n# `gradio_litmodel3d`\n<img alt=\"Static Badge\" src=\"https://img.shields.io/badge/version%20-%200.0.1%20-%20orange\">  \n\nAn improved Model3D component with environment map support\n\n## Installation\n\n```bash\npip install gradio_litmodel3d\n```\n\n## Usage\n\n```python\n\nimport gradio as gr\nfrom gradio_litmodel3d import LitModel3D\n\n# print gradio version\nprint(gr.__version__)\n\ndef update_hdr(hdr_upload):\n    return gr.update(env_map=hdr_upload.name if hdr_upload else None)\n\nwith gr.Blocks() as demo:\n    env_map = gr.File(label=\"HDR Environment Map\", file_types=[\".hdr\"], file_count=\"single\")\n    modelupload = gr.File(label=\"3D Model\", file_types=[\".obj\", \".gltf\", \".glb\"])\n    model3d = LitModel3D(interactive=False)\n\n    tonemapping = gr.Radio(\n        value=\"standard\",\n        label=\"Tonemapping\",\n        choices=[\"standard\", \"aces\"],\n    )\n    exposure = gr.Slider(\n        value=1.0,\n        label=\"Exposure\",\n        minimum=0.1,\n        maximum=5.0, \n        step=0.1,\n    )\n    contrast = gr.Slider(\n        value=1.0,\n        label=\"Contrast\",\n        minimum=0.1,\n        maximum=2.0, \n        step=0.1,\n    )\n    tonemapping.change(\n        lambda tonemapping: gr.update(tonemapping=tonemapping),\n        inputs=[tonemapping],\n        outputs=[model3d],\n    )\n    exposure.change(\n        lambda exposure: gr.update(exposure=exposure),\n        inputs=[exposure],\n        outputs=[model3d],\n    )\n    contrast.change(\n        lambda contrast: gr.update(contrast=contrast),\n        inputs=[contrast],\n        outputs=[model3d],\n    )\n\n    modelupload.change(\n        lambda model_upload: gr.update(value=model_upload),\n        inputs=[modelupload],\n        outputs=[model3d],\n    )\n    env_map.change(\n        update_hdr,\n        inputs=[env_map],\n        outputs=[model3d],\n    )\n\n\nif __name__ == \"__main__\":\n    demo.launch()\n\n```\n\n## `LitModel3D`\n\n### Initialization\n\n<table>\n<thead>\n<tr>\n<th align=\"left\">name</th>\n<th align=\"left\" style=\"width: 25%;\">type</th>\n<th align=\"left\">default</th>\n<th align=\"left\">description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>value</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | Callable | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">path to (.obj, .glb, .stl, .gltf, .splat, or .ply) file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the component.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>env_map</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">path to environment map file to show in model3D viewer. If callable, the function will be called whenever the app loads to set the initial value of the environment map.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>tonemapping</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nLiteral[\"standard\", \"aces\"] | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">tonemapping algorithm to use for rendering the scene. Should be one of \"standard\" or \"aces\". If not provided, defaults to \"standard\".</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>exposure</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat\n```\n\n</td>\n<td align=\"left\"><code>1.0</code></td>\n<td align=\"left\">exposure value to use for rendering the scene. Should be a float, increase this value to make the scene brighter, decrease to make it darker. Affects the exposure property of the camera.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>contrast</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat\n```\n\n</td>\n<td align=\"left\"><code>1.0</code></td>\n<td align=\"left\">contrast value to use for rendering the scene. Should be a float, increase this value to make the scene more contrasted, decrease to make it less contrasted. Affects the contrast property of the camera.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>clear_color</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\ntuple[float, float, float, float] | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">background color of scene, should be a tuple of 4 floats between 0 and 1 representing RGBA values.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>camera_position</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\ntuple[\n    int | float | None,\n    int | float | None,\n    int | float | None,\n]\n```\n\n</td>\n<td align=\"left\"><code>None, None, None</code></td>\n<td align=\"left\">initial camera position of scene, provided as a tuple of `(alpha, beta, radius)`. Each value is optional. If provided, `alpha` and `beta` should be in degrees reflecting the angular position along the longitudinal and latitudinal axes, respectively. Radius corresponds to the distance from the center of the object to the camera.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>zoom_speed</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat\n```\n\n</td>\n<td align=\"left\"><code>1</code></td>\n<td align=\"left\">the speed of zooming in and out of the scene when the cursor wheel is rotated or when screen is pinched on a mobile device. Should be a positive float, increase this value to make zooming faster, decrease to make it slower. Affects the wheelPrecision property of the camera.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>pan_speed</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat\n```\n\n</td>\n<td align=\"left\"><code>1</code></td>\n<td align=\"left\">the speed of panning the scene when the cursor is dragged or when the screen is dragged on a mobile device. Should be a positive float, increase this value to make panning faster, decrease to make it slower. Affects the panSensibility property of the camera.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>height</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">The height of the model3D component, specified in pixels if a number is passed, or in CSS units if a string is passed.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">The label for this component. Appears above the component and is also used as the header if there are a table of examples for this component. If None and used in a `gr.Interface`, the label will be the name of the parameter this component is assigned to.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>show_label</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">if True, will display label.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>every</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nfloat | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">If `value` is a callable, run the function 'every' number of seconds while the client connection is open. Has no effect otherwise. The event can be accessed (e.g. to cancel it) via this component's .load_event attribute.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>container</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">If True, will place the component in a container - providing some extra padding around the border.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>scale</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">relative size compared to adjacent Components. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>min_width</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint\n```\n\n</td>\n<td align=\"left\"><code>160</code></td>\n<td align=\"left\">minimum pixel width, will wrap if not sufficient screen space to satisfy this value. If a certain scale value results in this Component being narrower than min_width, the min_width parameter will be respected first.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>interactive</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">if True, will allow users to upload a file; if False, can only be used to display files. If not provided, this is inferred based on whether the component is used as an input or output.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>visible</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">If False, component will be hidden.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_id</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nstr | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>elem_classes</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nlist[str] | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>render</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nbool\n```\n\n</td>\n<td align=\"left\"><code>True</code></td>\n<td align=\"left\">If False, component will not render be rendered in the Blocks context. Should be used if the intention is to assign event listeners now but render the component later.</td>\n</tr>\n\n<tr>\n<td align=\"left\"><code>key</code></td>\n<td align=\"left\" style=\"width: 25%;\">\n\n```python\nint | str | None\n```\n\n</td>\n<td align=\"left\"><code>None</code></td>\n<td align=\"left\">if assigned, will be used to assume identity across a re-render. Components that have the same key across a re-render will have their value preserved.</td>\n</tr>\n</tbody></table>\n\n\n### Events\n\n| name | description |\n|:-----|:------------|\n| `change` | Triggered when the value of the LitModel3D changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |\n| `upload` | This listener is triggered when the user uploads a file into the LitModel3D. |\n| `edit` | This listener is triggered when the user edits the LitModel3D (e.g. image) using the built-in editor. |\n| `clear` | This listener is triggered when the user clears the LitModel3D using the X button for the component. |\n\n\n\n### User function\n\nThe impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).\n\n- When used as an Input, the component only impacts the input signature of the user function.\n- When used as an output, the component only impacts the return signature of the user function.\n\nThe code snippet below is accurate in cases where the component is used as both an input and an output.\n\n- **As output:** Is passed, passes the uploaded file as a {str} filepath to the function.\n- **As input:** Should return, expects function to return a {str} or {pathlib.Path} filepath of type (.obj, .glb, .stl, or .gltf).\n\n ```python\n def predict(\n     value: str | None\n ) -> str | Path | None:\n     return value\n ```\n \n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An improved Model3D component with environment map support",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [
        "3d",
        " env map",
        " environment map",
        " gradio-custom-component",
        " gradio-template-model3d",
        " illumination",
        " light",
        " model",
        " model 3d"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b531282ae85e449a6cd55953590f5f344b3374def2cb8aee1cfcffb1f660efda",
                "md5": "a4013d49d08694807658668373252cb0",
                "sha256": "1f59302f3406af963d6613d364a9d85740ff709843d94e90cd3736871e6982e5"
            },
            "downloads": -1,
            "filename": "gradio_litmodel3d-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a4013d49d08694807658668373252cb0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 989814,
            "upload_time": "2024-05-22T12:18:21",
            "upload_time_iso_8601": "2024-05-22T12:18:21.767081Z",
            "url": "https://files.pythonhosted.org/packages/b5/31/282ae85e449a6cd55953590f5f344b3374def2cb8aee1cfcffb1f660efda/gradio_litmodel3d-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7750103047eab2fcd5d86d62142083035c2d585afdc3bbd7edf36ae1151c7b65",
                "md5": "e73a9c31880a6a849e0996e0355f12bb",
                "sha256": "3052b4484631a1240c26709de06899fa4bd3db00f2c4b1573c491df5f0351bc4"
            },
            "downloads": -1,
            "filename": "gradio_litmodel3d-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e73a9c31880a6a849e0996e0355f12bb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 1027165,
            "upload_time": "2024-05-22T12:18:24",
            "upload_time_iso_8601": "2024-05-22T12:18:24.776887Z",
            "url": "https://files.pythonhosted.org/packages/77/50/103047eab2fcd5d86d62142083035c2d585afdc3bbd7edf36ae1151c7b65/gradio_litmodel3d-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-22 12:18:24",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "gradio-litmodel3d"
}
        
Elapsed time: 0.50972s