Spaces:
Sleeping
Sleeping
mohammed3536
commited on
Commit
•
67908fb
1
Parent(s):
52aa91a
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ def generate_mcqs_on_topic(text, topic, num_mcqs=5):
|
|
36 |
|
37 |
return mcqs
|
38 |
|
39 |
-
def generate_question_with_chatgpt(
|
40 |
headers = {
|
41 |
"Content-Type": "application/json",
|
42 |
"Authorization": f"Bearer {OPENAI_API_KEY}",
|
@@ -75,7 +75,6 @@ def main():
|
|
75 |
if pdf_file:
|
76 |
text = extract_text_from_pdf(pdf_file)
|
77 |
mcqs = generate_mcqs_on_topic(text, topic, num_mcqs)
|
78 |
-
question = generate_mcqs_on_topic(context)
|
79 |
|
80 |
# Display the generated Questions
|
81 |
st.success(f"Generated {num_mcqs} Questions:")
|
|
|
36 |
|
37 |
return mcqs
|
38 |
|
39 |
+
def generate_question_with_chatgpt():
|
40 |
headers = {
|
41 |
"Content-Type": "application/json",
|
42 |
"Authorization": f"Bearer {OPENAI_API_KEY}",
|
|
|
75 |
if pdf_file:
|
76 |
text = extract_text_from_pdf(pdf_file)
|
77 |
mcqs = generate_mcqs_on_topic(text, topic, num_mcqs)
|
|
|
78 |
|
79 |
# Display the generated Questions
|
80 |
st.success(f"Generated {num_mcqs} Questions:")
|