b0HIC4 commited on
Commit
d0c0b66
·
1 Parent(s): 60c582d

Add inference script

Browse files
Files changed (1) hide show
  1. test_pipeline.py +11 -0
test_pipeline.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ def main():
4
+ # Load a sentiment-analysis pipeline (downloads default model)
5
+ sentiment = pipeline("sentiment-analysis")
6
+ # Run inference
7
+ result = sentiment("I love using Hugging Face!")
8
+ print(result)
9
+
10
+ if __name__ == "__main__":
11
+ main()