Views
No views yet
1from comet import download_model, load_from_checkpoint
2
3# Load the model (assuming you have the checkpoint file)
4model_path = download_model("MEET-MR/COMET-Kiwi-MEET-MR")
5model = load_from_checkpoint(model_path)
6
7data = [
8 {
9 "src": "The premises of the mission shall be inviolable.",
10 "mt": "สถานที่ของภารกิจจะต้องไม่ถูกละเมิด",
11 "ref": "อาคารและสถานที่ของคณะผู้แทนจะถูกละเมิดมิได้"
12 },
13 {
14 "src": "A hydrating day & night cream.",
15 "mt": "ครีมน้ำในวันและคืน",
16 "ref": "ครีมให้ความชุ่มชื้นสำหรับกลางวันและกลางคืน"
17 }
18]
19
20model_output = model.predict(data, batch_size=8, gpus=1)
21print(model_output)