coolkrishds commited on
Commit
cd57423
·
1 Parent(s): 0a8898a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -1,6 +1,15 @@
1
  from transformers import pipeline
2
 
3
- classifier = pipeline("sentiment-analysis")
 
 
 
 
 
 
 
 
 
 
 
4
 
5
- res = classifier("I have been waiting for the transformer my whole life")
6
- print(res)
 
1
  from transformers import pipeline
2
 
3
+ # classifier = pipeline("sentiment-analysis")
4
+ # res = classifier("I have been waiting for the transformer my whole life")
5
+
6
+ generator = pipeline("text-generation2", model="distilgpt2")
7
+
8
+ res = generator {
9
+ "In this course we will teach you how to",
10
+ max_length=30,
11
+ num_return_sequences=2,
12
+ }
13
+ print(res)
14
+
15