ronig commited on
Commit
a1cee1f
·
1 Parent(s): 0d71559

installing requirements

Browse files
Files changed (1) hide show
  1. seefood_classifier_import.py +2 -0
seefood_classifier_import.py CHANGED
@@ -2,6 +2,7 @@ import sys
2
  from glob import glob
3
  from pathlib import Path
4
  import os
 
5
 
6
  import pip
7
  from huggingface_hub import snapshot_download
@@ -18,6 +19,7 @@ def install_packages(packages_path: Path):
18
  def get_seefood_classifier():
19
  model_repo = 'ronig/seefood'
20
  local_repo_path = Path(snapshot_download(model_repo, use_auth_token=os.environ['TOKEN']))
 
21
  install_packages(local_repo_path / 'build' / 'dist')
22
  sys.path.append(str(local_repo_path))
23
  from seefood_classifier import SeefoodClassifier
 
2
  from glob import glob
3
  from pathlib import Path
4
  import os
5
+ import subprocess
6
 
7
  import pip
8
  from huggingface_hub import snapshot_download
 
19
  def get_seefood_classifier():
20
  model_repo = 'ronig/seefood'
21
  local_repo_path = Path(snapshot_download(model_repo, use_auth_token=os.environ['TOKEN']))
22
+ subprocess.run(["pip", "install", "-r", str(local_repo_path / 'requirements.txt')])
23
  install_packages(local_repo_path / 'build' / 'dist')
24
  sys.path.append(str(local_repo_path))
25
  from seefood_classifier import SeefoodClassifier