Spaces:
Build error
Build error
Update app.py
Browse files
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=
|
| 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 |
|