my-test-model / test_pipeline.py
b0HIC4's picture
Add inference script
d0c0b66
raw
history blame contribute delete
291 Bytes
from transformers import pipeline
def main():
# Load a sentiment-analysis pipeline (downloads default model)
sentiment = pipeline("sentiment-analysis")
# Run inference
result = sentiment("I love using Hugging Face!")
print(result)
if __name__ == "__main__":
main()