updated readme
Browse files
README.md
CHANGED
|
@@ -9,6 +9,69 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
|
|
|
|
|
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
|
| 14 |

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# STL2GLB
|
| 13 |
+
|
| 14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 15 |
|
| 16 |

|
| 17 |
+
|
| 18 |
+
## Overview
|
| 19 |
+
|
| 20 |
+
The STL2GLB project is a simple tool that converts 3D models in STL format to GLB format. The conversion is powered by [trimesh](https://trimsh.org) and features an interactive Gradio interface. This project is containerized using Docker for easy deployment.
|
| 21 |
+
|
| 22 |
+
## Features
|
| 23 |
+
|
| 24 |
+
- Convert 3D models from STL to GLB format.
|
| 25 |
+
- Clean up temporary files created during conversion.
|
| 26 |
+
- Interactive model uploader and viewer using [Gradio](https://gradio.app).
|
| 27 |
+
|
| 28 |
+
# Getting Started
|
| 29 |
+
|
| 30 |
+
## Prerequisites
|
| 31 |
+
|
| 32 |
+
- Python 3.10 or newer.
|
| 33 |
+
- [Git LFS](https://git-lfs.github.com/) installed to work with large STL files.
|
| 34 |
+
- Docker (optional) for containerized deployment.
|
| 35 |
+
|
| 36 |
+
## Installation
|
| 37 |
+
|
| 38 |
+
1. Clone the repository:
|
| 39 |
+
|
| 40 |
+
```bash
|
| 41 |
+
git clone https://github.com/Hal51AI/STL2GLB.git
|
| 42 |
+
cd STL2GLB
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
2. Install dependencies:
|
| 46 |
+
|
| 47 |
+
```bash
|
| 48 |
+
pip install -r requirements.txt
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Running the Application Locally
|
| 52 |
+
|
| 53 |
+
Run the application using Python:
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
python app.py
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
This will launch the Gradio interface (by default on port 7860) where you can upload an STL file, convert it to GLB, and view the result.
|
| 60 |
+
|
| 61 |
+
## Running with Docker
|
| 62 |
+
|
| 63 |
+
1. Build the Docker image:
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
docker build -t stl2glb .
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
2. Run the Docker container:
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
docker run -p 7860:7860 stl2glb
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
The application will be available at http://0.0.0.0:7860.
|
| 76 |
+
|
| 77 |
+
|