tobegit3hub / simple_tensorflow_serving

Generic and easy-to-use serving service for machine learning models
https://stfs.readthedocs.io
Apache License 2.0
757 stars 195 forks source link

Fix TemplateNotFound (#60) #70

Closed stefanondisponibile closed 3 years ago

stefanondisponibile commented 4 years ago

Modifying template_folder and passing static_folder explicitly fixes the TemplateNotFound: index.html (#60) issue.

tobegit3hub commented 4 years ago

Thanks for your contribution @stefanondisponibile .

I have test by setting template_folder as ./template/ or ./simple_tensorflow_serving/template/ and it seems not work. How do you test this commit in your environment?

wordsappadmin commented 4 years ago

See https://github.com/tobegit3hub/simple_tensorflow_serving/pull/71

Replace: self.app = Flask("simple_tensorlow_serving", template_folder='templates') To: self.app = Flask("simple_tensorflow_serving", template_folder='templates')

You missed f in "simple_tensorflow_serving"

stefanondisponibile commented 4 years ago

@tobegit3hub sorry but I'm not sure I'm understading what you're asking. I was suggesting passing:

template_folder="simple_tensorflow_serving/templates",
static_folder="simple_tensorflow_serving/static",

Does it break the tests?

I'm actually using this edit to make it work in my project within Docker.

tobegit3hub commented 3 years ago

Thanks for your contribution and this has been fix by https://github.com/tobegit3hub/simple_tensorflow_serving/commit/0d9fc7ebd39af09a733f9ed4a765af219ffef6d9 .

I will close this pull-request and please let me know if it has any other issues.