Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -873,7 +873,7 @@ j. **Concluding and Intuitive Explanations**
|
|
873 |
response_text += "\n\nFinal Expert Verification:\n" + final_verification
|
874 |
|
875 |
# add the ChatGPT verification
|
876 |
-
if
|
877 |
response_text = append_chatgpt_verification(
|
878 |
response_text,
|
879 |
sympy_correct,
|
@@ -1188,6 +1188,14 @@ with gr.Blocks() as interface:
|
|
1188 |
info="Include relevant textbook examples to guide question generation",
|
1189 |
value="no"
|
1190 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1191 |
|
1192 |
generate_btn = gr.Button("Generate Question")
|
1193 |
|
@@ -1210,7 +1218,8 @@ with gr.Blocks() as interface:
|
|
1210 |
subject_dropdown,
|
1211 |
difficulty_slider,
|
1212 |
question_type,
|
1213 |
-
use_enhancement
|
|
|
1214 |
],
|
1215 |
outputs=[output_text, questions_file, full_file]
|
1216 |
)
|
|
|
873 |
response_text += "\n\nFinal Expert Verification:\n" + final_verification
|
874 |
|
875 |
# add the ChatGPT verification
|
876 |
+
if include_chatgpt == "yes":
|
877 |
response_text = append_chatgpt_verification(
|
878 |
response_text,
|
879 |
sympy_correct,
|
|
|
1188 |
info="Include relevant textbook examples to guide question generation",
|
1189 |
value="no"
|
1190 |
)
|
1191 |
+
|
1192 |
+
# Add ChatGPT verification toggle
|
1193 |
+
chatgpt_verify = gr.Radio(
|
1194 |
+
choices=["yes", "no"],
|
1195 |
+
label="Include ChatGPT Verification",
|
1196 |
+
info="Enable/disable ChatGPT grading (saves credits)",
|
1197 |
+
value="no" # Default to off to save credits
|
1198 |
+
)
|
1199 |
|
1200 |
generate_btn = gr.Button("Generate Question")
|
1201 |
|
|
|
1218 |
subject_dropdown,
|
1219 |
difficulty_slider,
|
1220 |
question_type,
|
1221 |
+
use_enhancement,
|
1222 |
+
chatgpt_verify
|
1223 |
],
|
1224 |
outputs=[output_text, questions_file, full_file]
|
1225 |
)
|