eliwill commited on
Commit
1dbcf29
·
1 Parent(s): 89f9a6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -18,8 +18,8 @@ krishnamurti_generator = pipeline("text-generation", model="distilgpt2")
18
  ############### DEFINING FUNCTIONS ###########################
19
 
20
  def ask_krishnamurti(question):
21
- answer = krishnamurti_generator(question, min_length=40, max_length=60)[0]['generated_text'] # generate about 50 word tokens
22
- answer = " ".join(sent_tokenize(answer)[:5]) # Get the first five sentences
23
  return answer
24
 
25
  def get_similar_quotes(question):
 
18
  ############### DEFINING FUNCTIONS ###########################
19
 
20
  def ask_krishnamurti(question):
21
+ answer = krishnamurti_generator(question, min_length=100, max_length=120)[0]['generated_text'] # generate about 50 word tokens
22
+ answer = " ".join(sent_tokenize(answer)[:6]) # Get the first five sentences
23
  return answer
24
 
25
  def get_similar_quotes(question):