Chad commited on
Commit ·
a3728af
1
Parent(s): 2c7e2de
45672uwwewewewedwdwd
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ def generate_quiz(subject, num_questions):
|
|
| 48 |
quiz_questions = []
|
| 49 |
try:
|
| 50 |
for i in range(num_questions):
|
| 51 |
-
prompt = f"Generate a multiple-choice history question about {subject}. Provide the question, four options labeled A, B, C, and D
|
| 52 |
response = client.chat.completions.create(
|
| 53 |
model="llama3-70b-8192",
|
| 54 |
messages=[{"role": "user", "content": prompt}],
|
|
|
|
| 48 |
quiz_questions = []
|
| 49 |
try:
|
| 50 |
for i in range(num_questions):
|
| 51 |
+
prompt = f"Generate a multiple-choice history question about {subject}. Provide the question, four options labeled A, B, C, and D. After providing the quiz add 5 new lines and then add all of the answers for the quiz in the following format Answers: (Question 1 - a, Question 2 - d ...and so on for each question)"
|
| 52 |
response = client.chat.completions.create(
|
| 53 |
model="llama3-70b-8192",
|
| 54 |
messages=[{"role": "user", "content": prompt}],
|