From 9b71c8f8de1a619a821a3c48f76e99194f46d2d8 Mon Sep 17 00:00:00 2001 From: Anthony MOI Date: Fri, 22 Nov 2019 20:57:54 -0500 Subject: [PATCH] Python - BPE construction --- bindings/python/src/models.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bindings/python/src/models.rs b/bindings/python/src/models.rs index d58a002a..782e4635 100644 --- a/bindings/python/src/models.rs +++ b/bindings/python/src/models.rs @@ -30,11 +30,8 @@ pub struct BPE {} #[pymethods] impl BPE { #[staticmethod] - fn from_files() -> PyResult { - match tk::models::bpe::BPE::from_files( - "../../data/gpt2-vocab.json", - "../../data/gpt2-merges.txt", - ) { + fn from_files(vocab: &str, merges: &str) -> PyResult { + match tk::models::bpe::BPE::from_files(vocab, merges) { Err(e) => { println!("Error: {:?}", e); Err(exceptions::Exception::py_err(