ckportfolio.com - Author: Python

Author: Python

import sys

from huggingface_hub.inference_api import InferenceApi
inference = InferenceApi(repo_id="gpt2", token="api_GchtTifOLRawnxBoMdZwUKxLdkXhhpJlmI")
output = inference(inputs=sys.argv[1])
suggestion = output[0]["generated_text"]

print(suggestion)
Fin