Spaces:
Runtime error
Runtime error
JustSkyDev commited on
Commit ·
856944d
1
Parent(s): da2b222
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,11 +7,7 @@ import io
|
|
| 7 |
import base64
|
| 8 |
import os
|
| 9 |
|
| 10 |
-
|
| 11 |
-
try:
|
| 12 |
-
os.makedirs('/.cache')
|
| 13 |
-
except PermissionError:
|
| 14 |
-
print("Unable to create /.cache directory due to insufficient permissions.")
|
| 15 |
|
| 16 |
class SegmentationBody(BaseModel):
|
| 17 |
baseImage: str
|
|
|
|
| 7 |
import base64
|
| 8 |
import os
|
| 9 |
|
| 10 |
+
os.environ['TORCH_HOME'] = "/app/cache"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
class SegmentationBody(BaseModel):
|
| 13 |
baseImage: str
|