Spaces:
Runtime error
Runtime error
fix: rename, etc
Browse files
app.py
CHANGED
@@ -7,8 +7,10 @@ import torch
|
|
7 |
from sentence_transformers.util import semantic_search
|
8 |
from transformers import AutoModel, AutoProcessor
|
9 |
|
10 |
-
st.title("
|
11 |
-
st.markdown(
|
|
|
|
|
12 |
|
13 |
|
14 |
@st.cache(allow_output_mutation=True, show_spinner=False)
|
@@ -34,8 +36,10 @@ model_type = st.radio(
|
|
34 |
|
35 |
if model_type == "Bingsu/clip-vit-base-patch32-ko":
|
36 |
model, processor = get_clip_model()
|
37 |
-
|
38 |
model, processor = get_dual_encoder_model()
|
|
|
|
|
39 |
|
40 |
info = pd.read_csv("info.csv")
|
41 |
with open("img_id.pkl", "rb") as f:
|
|
|
7 |
from sentence_transformers.util import semantic_search
|
8 |
from transformers import AutoModel, AutoProcessor
|
9 |
|
10 |
+
st.title("My CLIP Model Test")
|
11 |
+
st.markdown(
|
12 |
+
"[Unsplash Lite dataset](https://unsplash.com/data)์์ ์
๋ ฅ ํ
์คํธ์ ๊ฐ์ฅ ์ ์ฌํ ์ด๋ฏธ์ง๋ฅผ ๊ฒ์ํฉ๋๋ค."
|
13 |
+
)
|
14 |
|
15 |
|
16 |
@st.cache(allow_output_mutation=True, show_spinner=False)
|
|
|
36 |
|
37 |
if model_type == "Bingsu/clip-vit-base-patch32-ko":
|
38 |
model, processor = get_clip_model()
|
39 |
+
elif model_type == "Bingsu/vitB32_bert_ko_small_clip":
|
40 |
model, processor = get_dual_encoder_model()
|
41 |
+
else:
|
42 |
+
raise ValueError("Invalid model type")
|
43 |
|
44 |
info = pd.read_csv("info.csv")
|
45 |
with open("img_id.pkl", "rb") as f:
|