Upload tf model instead of writing its code (backend) #21
+69
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The processing logic should be the same except for the first step, i.e. insted of calling
update_codeyou should callupload_modelwhich returns no content since the identifier is the only parameter needed to fetch the model.The
graph_from_model_filereads the tf model in h5 format and converts it into a json string. I did not use the docker instance since there is no code to be executed.I couldn't test it since I can't program the frontend but the logic seems correct, let me know if you need further help.
The backend logic for file handling has been inspired by this post