yunzi7 commited on
Commit
061dbe0
โ€ข
1 Parent(s): b4f0950

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -0
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}")