Spaces:
Sleeping
Sleeping
mohammed3536
commited on
Commit
•
3904094
1
Parent(s):
1fe91ac
Update app.py
Browse files
app.py
CHANGED
@@ -27,14 +27,7 @@ def generate_mcqs_on_topic(text, topic, num_mcqs=5):
|
|
27 |
# Randomly select sentences to create Questions
|
28 |
selected_sentences = random.sample(sentences, min(num_mcqs, len(sentences)))
|
29 |
|
30 |
-
|
31 |
-
for sentence in selected_sentences:
|
32 |
-
# Use ChatGPT for interactive question generation
|
33 |
-
chatgpt_question = generate_question_with_chatgpt(sentence)
|
34 |
-
mcqs.append(chatgpt_question)
|
35 |
-
|
36 |
-
|
37 |
-
return mcqs
|
38 |
|
39 |
def generate_question_with_chatgpt(context):
|
40 |
headers = {
|
|
|
27 |
# Randomly select sentences to create Questions
|
28 |
selected_sentences = random.sample(sentences, min(num_mcqs, len(sentences)))
|
29 |
|
30 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
def generate_question_with_chatgpt(context):
|
33 |
headers = {
|