Spaces:
Runtime error
Runtime error
silveroxides
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ translator = pipeline("translation", model="Helsinki-NLP/opus-mt-ko-en")
|
|
30 |
class HFEmbedder(nn.Module):
|
31 |
def __init__(self, version: str, max_length: int, **hf_kwargs):
|
32 |
super().__init__()
|
33 |
-
self.is_clip = version.
|
34 |
self.max_length = max_length
|
35 |
self.output_key = "pooler_output" if self.is_clip else "last_hidden_state"
|
36 |
|
|
|
30 |
class HFEmbedder(nn.Module):
|
31 |
def __init__(self, version: str, max_length: int, **hf_kwargs):
|
32 |
super().__init__()
|
33 |
+
self.is_clip = version.endswith("clip-vit-large-patch14")
|
34 |
self.max_length = max_length
|
35 |
self.output_key = "pooler_output" if self.is_clip else "last_hidden_state"
|
36 |
|