verymehari commited on
Commit
df5c44f
verified
1 Parent(s): c1a1d03

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -9
app.py CHANGED
@@ -5,13 +5,7 @@ import uuid
5
  import shutil
6
  import tempfile
7
 
8
-
9
- import sys
10
- import subprocess as _sp
11
- _sp.run([sys.executable, '-m', 'pip', 'install', '--quiet', 'git+https://github.com/apple/ml-sharp.git'], check=True)
12
-
13
- DESCRIPTION = """
14
- # SHARP 路 3D from a Single Photo
15
  Upload any photo and get a **3D Gaussian Splat (.ply)** in seconds.
16
  Powered by Apple's [SHARP](https://github.com/apple/ml-sharp) monocular view synthesis model.
17
 
@@ -21,8 +15,7 @@ Powered by Apple's [SHARP](https://github.com/apple/ml-sharp) monocular view syn
21
  3. Download the `.ply` file
22
  4. View it at [SuperSplat](https://playcanvas.com/supersplat/editor)
23
 
24
- > Running on CPU - first run downloads the 2.6GB model and may take 5-10 min.
25
- """
26
 
27
  def generate_splat(image_path):
28
  if image_path is None:
@@ -66,3 +59,18 @@ with gr.Blocks(title="SHARP 3D") as demo:
66
 
67
  if __name__ == "__main__":
68
  demo.launch(server_name="0.0.0.0")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  import shutil
6
  import tempfile
7
 
8
+ DESCRIPTION = """# SHARP 路 3D from a Single Photo
 
 
 
 
 
 
9
  Upload any photo and get a **3D Gaussian Splat (.ply)** in seconds.
10
  Powered by Apple's [SHARP](https://github.com/apple/ml-sharp) monocular view synthesis model.
11
 
 
15
  3. Download the `.ply` file
16
  4. View it at [SuperSplat](https://playcanvas.com/supersplat/editor)
17
 
18
+ > Running on CPU - first run downloads the 2.6GB model and may take 5-10 min."""
 
19
 
20
  def generate_splat(image_path):
21
  if image_path is None:
 
59
 
60
  if __name__ == "__main__":
61
  demo.launch(server_name="0.0.0.0")
62
+ ```
63
+
64
+ And you need these two files in the repo root:
65
+
66
+ **`requirements.txt`**
67
+ ```
68
+ gradio>=4.40.0
69
+ git+https://github.com/apple/ml-sharp.git
70
+ ```
71
+
72
+ **`packages.txt`** (for system deps SHARP likely needs)
73
+ ```
74
+ git
75
+ libgl1-mesa-glx
76
+ libglib2.0-0