Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,13 @@ import numpy as np
|
|
6 |
from transformers import AutoModel
|
7 |
from theia.decoding import load_feature_stats, prepare_depth_decoder, prepare_mask_generator, decode_everything
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
@spaces.GPU(duration=30)
|
10 |
def run_theia(image):
|
11 |
theia_model = AutoModel.from_pretrained("theaiinstitute/theia-tiny-patch16-224-cddsv", trust_remote_code=True)
|
|
|
6 |
from transformers import AutoModel
|
7 |
from theia.decoding import load_feature_stats, prepare_depth_decoder, prepare_mask_generator, decode_everything
|
8 |
|
9 |
+
|
10 |
+
def load_description(fp):
|
11 |
+
with open(fp, 'r', encoding='utf-8') as f:
|
12 |
+
content = f.read()
|
13 |
+
return content
|
14 |
+
|
15 |
+
|
16 |
@spaces.GPU(duration=30)
|
17 |
def run_theia(image):
|
18 |
theia_model = AutoModel.from_pretrained("theaiinstitute/theia-tiny-patch16-224-cddsv", trust_remote_code=True)
|