mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-05-16 21:00:16 +00:00
* Update and rename README to README.md and Unicode strings Updated Readme file and converted from rst to markdown. String contains ascii characters (converted to unicode string) Signed-off-by: Mpho Mphego mpho112@gmail.com * Deprecated import `from __future__ import unicode_literals` removed and ran isort module https://mail.python.org/pipermail/python-dev/2016-December/147009.html Included setuptool-git in the requirement.txt and updated `setup.py` Reasons for this are highlighted here -> https://github.com/msabramo/setuptools-git#usage
26 lines
722 B
Python
26 lines
722 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright (c) 2017-present, Facebook, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
from __future__ import absolute_import, division, print_function
|
|
|
|
import pickle
|
|
|
|
import pkg_resources
|
|
|
|
|
|
def get_prophet_stan_model():
|
|
"""Load compiled Stan model"""
|
|
model_file = pkg_resources.resource_filename(
|
|
'fbprophet',
|
|
'stan_model/prophet_model.pkl',
|
|
)
|
|
with open(model_file, 'rb') as f:
|
|
return pickle.load(f)
|
|
|
|
|
|
prophet_stan_model = get_prophet_stan_model()
|