Spaces:
Sleeping
Sleeping
winfred2027
commited on
Commit
•
64796cc
1
Parent(s):
0d10d86
Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,14 @@ def load_openshape(name, to_cpu=False):
|
|
32 |
return pce
|
33 |
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
def retrieval_filter_expand():
|
36 |
sim_th = st.sidebar.slider("Similarity Threshold", 0.05, 0.5, 0.1, key='rsimth')
|
37 |
tag = ""
|
@@ -189,7 +197,8 @@ try:
|
|
189 |
f32 = numpy.float32
|
190 |
half = torch.float16 if torch.cuda.is_available() else torch.bfloat16
|
191 |
clip_model, clip_prep = load_openclip()
|
192 |
-
model_g14 = load_openshape('openshape-pointbert-vitg14-rgb')
|
|
|
193 |
|
194 |
st.caption("This demo presents three tasks: 3D classification, cross-modal retrieval, and cross-modal generation. Examples are provided for demonstration purposes. You're encouraged to fine-tune task parameters and upload files for customized testing as required.")
|
195 |
st.sidebar.title("TripletMix Demo Configuration Panel")
|
|
|
32 |
return pce
|
33 |
|
34 |
|
35 |
+
def load_tripletmix(name, to_cpu=False):
|
36 |
+
pce = openshape.load_pc_encoder_mix(name)
|
37 |
+
if to_cpu:
|
38 |
+
pce = pce.cpu()
|
39 |
+
return pce
|
40 |
+
|
41 |
+
|
42 |
+
|
43 |
def retrieval_filter_expand():
|
44 |
sim_th = st.sidebar.slider("Similarity Threshold", 0.05, 0.5, 0.1, key='rsimth')
|
45 |
tag = ""
|
|
|
197 |
f32 = numpy.float32
|
198 |
half = torch.float16 if torch.cuda.is_available() else torch.bfloat16
|
199 |
clip_model, clip_prep = load_openclip()
|
200 |
+
#model_g14 = load_openshape('openshape-pointbert-vitg14-rgb')
|
201 |
+
model_g14 = load_tripletmix('tripletmix-spconv-all')
|
202 |
|
203 |
st.caption("This demo presents three tasks: 3D classification, cross-modal retrieval, and cross-modal generation. Examples are provided for demonstration purposes. You're encouraged to fine-tune task parameters and upload files for customized testing as required.")
|
204 |
st.sidebar.title("TripletMix Demo Configuration Panel")
|