Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ button = st.button("Generate Questions and Answers")
|
|
19 |
|
20 |
with st.spinner("Generating Questions and Answers.."):
|
21 |
if button and sentence:
|
22 |
-
generated_questions = text_generator(sentence, max_length=
|
23 |
for question_index, question_output in enumerate(generated_questions):
|
24 |
st.subheader(f"Question {question_index + 1}: {question_output['generated_text']}")
|
25 |
answers = qa(question=question_output['generated_text'], context=sentence, topk=num_answers)
|
|
|
19 |
|
20 |
with st.spinner("Generating Questions and Answers.."):
|
21 |
if button and sentence:
|
22 |
+
generated_questions = text_generator(sentence, max_length=100, num_return_sequences=num_questions)
|
23 |
for question_index, question_output in enumerate(generated_questions):
|
24 |
st.subheader(f"Question {question_index + 1}: {question_output['generated_text']}")
|
25 |
answers = qa(question=question_output['generated_text'], context=sentence, topk=num_answers)
|