Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,8 @@ question_generator = pipeline("text2text-generation", model="valhalla/t5-small-q
|
|
6 |
|
7 |
# Function to generate MCQs
|
8 |
def generate_mcqs(content, num_questions):
|
9 |
-
# Generate questions
|
10 |
-
questions = question_generator(content, max_length=512, num_return_sequences=num_questions)
|
11 |
return questions
|
12 |
|
13 |
# Streamlit UI
|
@@ -26,3 +26,4 @@ if st.button("Generate MCQs"):
|
|
26 |
|
27 |
|
28 |
|
|
|
|
6 |
|
7 |
# Function to generate MCQs
|
8 |
def generate_mcqs(content, num_questions):
|
9 |
+
# Generate questions with beam search
|
10 |
+
questions = question_generator(content, max_length=512, num_return_sequences=num_questions, num_beams=num_questions)
|
11 |
return questions
|
12 |
|
13 |
# Streamlit UI
|
|
|
26 |
|
27 |
|
28 |
|
29 |
+
|