tlemagueresse commited on
Commit
ad93d91
·
1 Parent(s): 7b23ae2

Fix typing and update pkl

Browse files
examples/example_usage_fastmodel_hf.py CHANGED
@@ -6,10 +6,10 @@ import importlib.util
6
  repo_id = "tlmk22/QuefrencyGuardian"
7
  model_file = "model.py"
8
  model_path = hf_hub_download(repo_id=repo_id, filename=model_file)
9
- spec = importlib.util.spec_from_file_location("model", model_file)
10
- fastmodel_module = importlib.util.module_from_spec(spec)
11
- spec.loader.exec_module(fastmodel_module)
12
- FastModelHuggingFace = fastmodel_module.FastModelHuggingFace
13
  fast_model = FastModelHuggingFace.from_pretrained(repo_id)
14
 
15
  # Perform predictions for a single WAV file
 
6
  repo_id = "tlmk22/QuefrencyGuardian"
7
  model_file = "model.py"
8
  model_path = hf_hub_download(repo_id=repo_id, filename=model_file)
9
+ spec = importlib.util.spec_from_file_location("model", model_path)
10
+ model_module = importlib.util.module_from_spec(spec)
11
+ spec.loader.exec_module(model_module)
12
+ FastModelHuggingFace = model_module.FastModelHuggingFace
13
  fast_model = FastModelHuggingFace.from_pretrained(repo_id)
14
 
15
  # Perform predictions for a single WAV file
model.py CHANGED
@@ -495,7 +495,7 @@ class FastModelHuggingFace:
495
 
496
 
497
  def save_pipeline(
498
- model_class_instance: FastModelHuggingFace,
499
  path: str,
500
  lgbm_file_name: str = None,
501
  pipeline_file_name: str = None,
 
495
 
496
 
497
  def save_pipeline(
498
+ model_class_instance: FastModel,
499
  path: str,
500
  lgbm_file_name: str = None,
501
  pipeline_file_name: str = None,
pipeline.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:37040a799b897c6902c1b520cf902223f145c5d61831f0c316317a9d999d8d61
3
- size 834075
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:246724543a2e1bbfbeab22fe266696729ad5719bb7908b01e6dbf44ff930a1b5
3
+ size 834067