Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def generate_questions_with_retry(knowledge_material, question_type, cognitive_l
|
|
39 |
while retries < max_retries:
|
40 |
try:
|
41 |
response = client.chat.completions.create(
|
42 |
-
model="gpt-
|
43 |
messages=[
|
44 |
{"role": "system", "content": "You are a helpful assistant for generating exam questions."},
|
45 |
{"role": "user", "content": prompt}
|
@@ -82,8 +82,6 @@ else:
|
|
82 |
if uploaded_file.size > 5 * 1024 * 1024: # 5 MB limit
|
83 |
st.warning("File size exceeds 5 MB. Please upload a smaller file.")
|
84 |
else:
|
85 |
-
# Here you can add code to extract text from the PDF if needed
|
86 |
-
# For simplicity, we're focusing on the text input for now
|
87 |
st.success("File uploaded successfully! (Text extraction not implemented yet.)")
|
88 |
|
89 |
# Select question type
|
|
|
39 |
while retries < max_retries:
|
40 |
try:
|
41 |
response = client.chat.completions.create(
|
42 |
+
model="gpt-3.5-turbo",
|
43 |
messages=[
|
44 |
{"role": "system", "content": "You are a helpful assistant for generating exam questions."},
|
45 |
{"role": "user", "content": prompt}
|
|
|
82 |
if uploaded_file.size > 5 * 1024 * 1024: # 5 MB limit
|
83 |
st.warning("File size exceeds 5 MB. Please upload a smaller file.")
|
84 |
else:
|
|
|
|
|
85 |
st.success("File uploaded successfully! (Text extraction not implemented yet.)")
|
86 |
|
87 |
# Select question type
|