Python
1
Вклад в тег
pyinstaller -F --add-data coco-dataset.labels;models --add-data yolov3-tiny.cfg;models --add-data yolov3-tiny.weights;models pine.py
import os
import sys
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
if getattr(sys, 'frozen', False):
base_path = sys._MEIPASS
else:
base_path = os.getcwd()
return os.path.join(base_path, relative_path)