#filename: file.py
from codetf.models import load_model_pipeline
code_generation_model = load_model_pipeline(model_name="codet5", task="pretrained",
model_type="plus-220M", is_eval=True,
load_in_8bit=True, weight_sharding=False)
result = code_generation_model.predict(["Generate a complete C program to add two numbers and display the result."])
print(result)
Python3 file.py
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.local/lib/python3.10/site-packages/codetf/configs/default.yaml
I am using linux kernel 5.15.0-46-generic, Ubuntu 22.04.
Installation mode: pip install salesforce-codetf
Code:
I am using linux kernel 5.15.0-46-generic, Ubuntu 22.04. Installation mode:
pip install salesforce-codetf