Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -206,7 +206,16 @@ def generate_test_with_processing(total_marks, topic_name, level):
|
|
| 206 |
# Return the final result
|
| 207 |
yield result
|
| 208 |
# --- Gradio Interface ---
|
| 209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
gr.Markdown("# 📝 IB Mathematics Test Generator (Latest Question Priority)")
|
| 211 |
gr.Markdown(
|
| 212 |
"Enter the desired total marks, a topic name, and the level (SL/AHL). "
|
|
@@ -230,15 +239,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 230 |
with gr.Column(scale=3):
|
| 231 |
output_markdown = gr.Markdown(
|
| 232 |
label="Generated Test Paper",
|
|
|
|
| 233 |
latex_delimiters=[
|
| 234 |
{"left": "$$", "right": "$$", "display": True},
|
| 235 |
{"left": "$", "right": "$", "display": False}
|
| 236 |
]
|
| 237 |
-
).style(
|
| 238 |
-
container=True,
|
| 239 |
-
border=True,
|
| 240 |
-
rounded=True,
|
| 241 |
-
background="white"
|
| 242 |
)
|
| 243 |
|
| 244 |
generate_button.click(
|
|
@@ -249,7 +254,3 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 249 |
|
| 250 |
if __name__ == "__main__":
|
| 251 |
demo.launch()
|
| 252 |
-
|
| 253 |
-
# --- Provided Topics List ---
|
| 254 |
-
|
| 255 |
-
|
|
|
|
| 206 |
# Return the final result
|
| 207 |
yield result
|
| 208 |
# --- Gradio Interface ---
|
| 209 |
+
# --- Gradio Interface ---
|
| 210 |
+
with gr.Blocks(theme=gr.themes.Soft(), css="""
|
| 211 |
+
#output-area {
|
| 212 |
+
background: white !important;
|
| 213 |
+
padding: 20px;
|
| 214 |
+
border-radius: 8px;
|
| 215 |
+
border: 1px solid #ddd;
|
| 216 |
+
}
|
| 217 |
+
""") as demo:
|
| 218 |
+
|
| 219 |
gr.Markdown("# 📝 IB Mathematics Test Generator (Latest Question Priority)")
|
| 220 |
gr.Markdown(
|
| 221 |
"Enter the desired total marks, a topic name, and the level (SL/AHL). "
|
|
|
|
| 239 |
with gr.Column(scale=3):
|
| 240 |
output_markdown = gr.Markdown(
|
| 241 |
label="Generated Test Paper",
|
| 242 |
+
elem_id="output-area",
|
| 243 |
latex_delimiters=[
|
| 244 |
{"left": "$$", "right": "$$", "display": True},
|
| 245 |
{"left": "$", "right": "$", "display": False}
|
| 246 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
)
|
| 248 |
|
| 249 |
generate_button.click(
|
|
|
|
| 254 |
|
| 255 |
if __name__ == "__main__":
|
| 256 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|