File size: 757 Bytes
abfeaa2
 
 
 
 
 
5934cfc
abfeaa2
 
5934cfc
 
 
 
 
 
abfeaa2
061dbe0
 
50abe92
 
061dbe0
 
 
50abe92
061dbe0
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
license: apache-2.0
language:
- ko
metrics:
- accuracy
- recall
tags:
- multimodal
- audio
- video
- homecam
- transformer
datasets:
- SilverAvocado/SilverDataset
---
## Load Model For Inference

```python
# Hugging Face Hub์—์„œ ๋ชจ๋ธ ๋‹ค์šด๋กœ๋“œ
MODEL_PATH="silver_assistant_transformer.keras"
model_path = hf_hub_download(repo_id="SilverAvocado/silverAssistant", filename=MODEL_PATH)

# ์‚ฌ์šฉ์ž ์ •์˜ ํด๋ž˜์Šค ๋กœ๋“œ
model = load_model(
    model_path,
    custom_objects={
        "PositionalEncoding": PositionalEncoding,
        "AttentionPooling1D": AttentionPooling1D
    }
)

y_pred = np.argmax(model.predict([X_test1, X_test2, X_test3, X_test4]), axis=1)
accuracy = accuracy_score(y_test, y_pred)
print(f"Test Accuracy: {accuracy:.4f}")