Silver-Multimodal / README.md
SeoyeonPark1223's picture
Update README.md
5934cfc verified
|
raw
history blame
757 Bytes
metadata
license: apache-2.0
language:
  - ko
metrics:
  - accuracy
  - recall
tags:
  - multimodal
  - audio
  - video
  - homecam
  - transformer
datasets:
  - SilverAvocado/SilverDataset

Load Model For Inference

# 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}")