pratikshahp commited on
Commit
69d7207
·
verified ·
1 Parent(s): afca308

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def generate_questions(text, num_questions=5):
28
  for _ in range(num_questions):
29
  # Generate a single question at a time
30
  prompt = f"Generate a question based on the following text:\n{text}\n\nQuestion:"
31
- generated = generator(prompt, max_length=300, num_return_sequences=1)
32
  question = generated[0]["generated_text"].split("Question:")[1].strip()
33
  questions.append(question)
34
 
 
28
  for _ in range(num_questions):
29
  # Generate a single question at a time
30
  prompt = f"Generate a question based on the following text:\n{text}\n\nQuestion:"
31
+ generated = generator(prompt, max_length=500, num_return_sequences=1)
32
  question = generated[0]["generated_text"].split("Question:")[1].strip()
33
  questions.append(question)
34