Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
## Load Model For Inference
|
2 |
+
|
3 |
+
### Hugging Face Hub์์ ๋ชจ๋ธ ๋ค์ด๋ก๋
|
4 |
+
MODEL_PATH="silver_assistant_transformer.keras"
|
5 |
+
model_path = hf_hub_download(repo_id="SilverAvocado/silverAssistant", filename=MODEL_PATH)
|
6 |
+
|
7 |
+
### ์ฌ์ฉ์ ์ ์ ํด๋์ค ๋ก๋
|
8 |
+
model = load_model(
|
9 |
+
model_path,
|
10 |
+
custom_objects={
|
11 |
+
"PositionalEncoding": PositionalEncoding,
|
12 |
+
"AttentionPooling1D": AttentionPooling1D
|
13 |
+
}
|
14 |
+
)
|
15 |
+
|
16 |
+
|
17 |
+
y_pred = np.argmax(model.predict([X_test1, X_test2, X_test3, X_test4]), axis=1)
|
18 |
+
accuracy = accuracy_score(y_test, y_pred)
|
19 |
+
print(f"Test Accuracy: {accuracy:.4f}")
|