Importing from Github
Before you upload your custom model from Github, make sure you go through and follow the prerequisites conditions mentioned below.
File structure requirements
The below format should be kept in mind while loading your code to Inferless from GitHub.
-
The mandatory requirement would be an “
app.py" file.
-
This file should contain the below functions(Mandatory)
-
def initialize(self)
-
def infer(self, inputs)
-
def finalize(self)
-
You can have other files/modules along with the “
app.py"
file in case of any dependencies. -
You should also have a file
input_schema.py
if not then you will need to define
Github: https://github.com/infer-less/template-method
Supported Libraries
The below libraries are only supported in the current version. Make sure that the “app.py"
requires libraries only from the below list:
-
transformers
-
torch
-
tensorflow
-
onnx
-
onnxruntime
-
numpy
-
pandas
-
diffusers
-
Pillow
-
pytesseract
-
opencv
In case your use case requires any additional library, feel free to raise a support request with us using the help desk or contact us at support@inferless.com
and we would be happy to discuss and take the request on a case-case basis.
Once you have made sure of the above conditions, click here to know more about how to import this model from Github to Inferless.
Resources
GitHub - manojkumartjpk/template_method: Testing out template methodGitHub
Click above to open the sample template for reference