Commit
·
d47233e
1
Parent(s):
20b2f53
Update app.py to install necessary dependencies and simplify usage instructions in create_app function
Browse files
app.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
-
os.environ["PYOPENGL_PLATFORM"] = "osmesa"
|
| 3 |
-
|
| 4 |
import shutil
|
| 5 |
import subprocess
|
| 6 |
import time
|
|
@@ -14,6 +11,9 @@ import torch
|
|
| 14 |
import yaml
|
| 15 |
from box import Box
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
# Get the PyTorch and CUDA versions
|
| 18 |
torch_version = torch.__version__.split("+")[0] # Strips any "+cuXXX" suffix
|
| 19 |
cuda_version = torch.version.cuda
|
|
@@ -355,20 +355,9 @@ def create_app():
|
|
| 355 |
""")
|
| 356 |
|
| 357 |
# Usage Instructions Section
|
| 358 |
-
gr.Markdown("""
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
2. **Choose processing mode**:
|
| 362 |
-
- **Skeleton Only**: Generate just the bone structure for your model
|
| 363 |
-
- **Skinning Only**: Apply skinning weights (requires existing skeleton data)
|
| 364 |
-
- **Complete Pipeline**: Full automated rigging (skeleton + skinning + merge)
|
| 365 |
-
3. **Set random seed** (optional) - Use the same seed for reproducible results
|
| 366 |
-
4. **Click "Start Processing"** - The AI will process your model based on the selected mode
|
| 367 |
-
5. **Download results** - Different files will be generated based on your selected mode
|
| 368 |
-
|
| 369 |
-
**Supported File Formats:** .obj, .fbx, .glb
|
| 370 |
-
|
| 371 |
-
**Note:** The process may take a few minutes depending on the model complexity and server load.
|
| 372 |
""")
|
| 373 |
|
| 374 |
with gr.Row(equal_height=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import shutil
|
| 2 |
import subprocess
|
| 3 |
import time
|
|
|
|
| 11 |
import yaml
|
| 12 |
from box import Box
|
| 13 |
|
| 14 |
+
subprocess.run(["apt", "update"], check=True)
|
| 15 |
+
subprocess.run(["apt", "install", "-y", "libegl1-mesa", "libgles2-mesa"], check=True)
|
| 16 |
+
|
| 17 |
# Get the PyTorch and CUDA versions
|
| 18 |
torch_version = torch.__version__.split("+")[0] # Strips any "+cuXXX" suffix
|
| 19 |
cuda_version = torch.version.cuda
|
|
|
|
| 355 |
""")
|
| 356 |
|
| 357 |
# Usage Instructions Section
|
| 358 |
+
gr.Markdown("""## Notes:
|
| 359 |
+
- Supported File Formats are `.obj`, `.fbx`, `.glb`
|
| 360 |
+
- The process may take a few minutes depending on the model complexity and server load.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 361 |
""")
|
| 362 |
|
| 363 |
with gr.Row(equal_height=True):
|