Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -222,100 +222,79 @@ def generate_exam(exam_mode, subject, code, units, numA, numB, numC, syllabus_fi
|
|
| 222 |
except Exception as e:
|
| 223 |
return None, f"❌ Error: {str(e)}"
|
| 224 |
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
}
|
| 241 |
-
.main {
|
| 242 |
-
width: 100% !important;
|
| 243 |
-
max-width: 100% !important;
|
| 244 |
-
padding: 20px !important;
|
| 245 |
-
}
|
| 246 |
-
#component-0 {
|
| 247 |
-
max-width: 100% !important;
|
| 248 |
-
width: 100% !important;
|
| 249 |
-
}
|
| 250 |
-
.header-gradient {
|
| 251 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 252 |
-
color: white;
|
| 253 |
-
padding: 40px 20px;
|
| 254 |
-
text-align: center;
|
| 255 |
-
border-radius: 15px;
|
| 256 |
-
margin-bottom: 30px;
|
| 257 |
-
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
|
| 258 |
-
}
|
| 259 |
-
.header-gradient h1 {
|
| 260 |
-
font-size: 2.5rem;
|
| 261 |
-
margin: 0 0 10px 0;
|
| 262 |
-
font-weight: 700;
|
| 263 |
-
}
|
| 264 |
-
.header-gradient p {
|
| 265 |
-
margin: 5px 0;
|
| 266 |
-
font-size: 1.1rem;
|
| 267 |
-
opacity: 0.95;
|
| 268 |
-
}
|
| 269 |
-
.feature-card {
|
| 270 |
-
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
| 271 |
-
padding: 25px;
|
| 272 |
-
border-radius: 12px;
|
| 273 |
-
border-left: 5px solid #667eea;
|
| 274 |
-
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 275 |
-
height: 100%;
|
| 276 |
-
}
|
| 277 |
-
.feature-card h4 {
|
| 278 |
-
color: #667eea;
|
| 279 |
-
margin-top: 0;
|
| 280 |
-
font-size: 1.3rem;
|
| 281 |
-
}
|
| 282 |
-
.feature-card ul {
|
| 283 |
-
list-style: none;
|
| 284 |
-
padding: 0;
|
| 285 |
-
margin: 15px 0 0 0;
|
| 286 |
-
}
|
| 287 |
-
.feature-card li {
|
| 288 |
-
padding: 8px 0;
|
| 289 |
-
font-size: 1rem;
|
| 290 |
-
color: #2d3748;
|
| 291 |
-
}
|
| 292 |
-
.section-title {
|
| 293 |
-
color: #667eea;
|
| 294 |
-
font-size: 1.4rem;
|
| 295 |
-
font-weight: 600;
|
| 296 |
-
margin: 20px 0 15px 0;
|
| 297 |
-
padding-bottom: 10px;
|
| 298 |
-
border-bottom: 2px solid #667eea;
|
| 299 |
-
}
|
| 300 |
-
footer {
|
| 301 |
-
text-align: center;
|
| 302 |
-
padding: 20px;
|
| 303 |
-
color: #718096;
|
| 304 |
-
margin-top: 40px;
|
| 305 |
-
border-top: 1px solid #e2e8f0;
|
| 306 |
-
}
|
| 307 |
-
@media (max-width: 768px) {
|
| 308 |
.header-gradient h1 {
|
| 309 |
-
font-size:
|
|
|
|
|
|
|
| 310 |
}
|
| 311 |
.header-gradient p {
|
| 312 |
-
|
|
|
|
|
|
|
| 313 |
}
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 319 |
<div class="header-gradient">
|
| 320 |
<h1>SNS Tech - Q&A Agent x Codeboosters Tech</h1>
|
| 321 |
<p><strong>AI-Powered Question Paper & Answer Key Generator</strong></p>
|
|
|
|
| 222 |
except Exception as e:
|
| 223 |
return None, f"❌ Error: {str(e)}"
|
| 224 |
|
| 225 |
+
# Create the interface without inline CSS for older Gradio versions
|
| 226 |
+
with gr.Blocks() as demo:
|
| 227 |
+
gr.HTML("""
|
| 228 |
+
<style>
|
| 229 |
+
* {
|
| 230 |
+
box-sizing: border-box;
|
| 231 |
+
}
|
| 232 |
+
.header-gradient {
|
| 233 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 234 |
+
color: white;
|
| 235 |
+
padding: 40px 20px;
|
| 236 |
+
text-align: center;
|
| 237 |
+
border-radius: 15px;
|
| 238 |
+
margin-bottom: 30px;
|
| 239 |
+
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
|
| 240 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 241 |
.header-gradient h1 {
|
| 242 |
+
font-size: 2.5rem;
|
| 243 |
+
margin: 0 0 10px 0;
|
| 244 |
+
font-weight: 700;
|
| 245 |
}
|
| 246 |
.header-gradient p {
|
| 247 |
+
margin: 5px 0;
|
| 248 |
+
font-size: 1.1rem;
|
| 249 |
+
opacity: 0.95;
|
| 250 |
}
|
| 251 |
+
.feature-card {
|
| 252 |
+
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
|
| 253 |
+
padding: 25px;
|
| 254 |
+
border-radius: 12px;
|
| 255 |
+
border-left: 5px solid #667eea;
|
| 256 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 257 |
+
height: 100%;
|
| 258 |
+
}
|
| 259 |
+
.feature-card h4 {
|
| 260 |
+
color: #667eea;
|
| 261 |
+
margin-top: 0;
|
| 262 |
+
font-size: 1.3rem;
|
| 263 |
+
}
|
| 264 |
+
.feature-card ul {
|
| 265 |
+
list-style: none;
|
| 266 |
+
padding: 0;
|
| 267 |
+
margin: 15px 0 0 0;
|
| 268 |
+
}
|
| 269 |
+
.feature-card li {
|
| 270 |
+
padding: 8px 0;
|
| 271 |
+
font-size: 1rem;
|
| 272 |
+
color: #2d3748;
|
| 273 |
+
}
|
| 274 |
+
.section-title {
|
| 275 |
+
color: #667eea;
|
| 276 |
+
font-size: 1.4rem;
|
| 277 |
+
font-weight: 600;
|
| 278 |
+
margin: 20px 0 15px 0;
|
| 279 |
+
padding-bottom: 10px;
|
| 280 |
+
border-bottom: 2px solid #667eea;
|
| 281 |
+
}
|
| 282 |
+
footer {
|
| 283 |
+
text-align: center;
|
| 284 |
+
padding: 20px;
|
| 285 |
+
color: #718096;
|
| 286 |
+
margin-top: 40px;
|
| 287 |
+
border-top: 1px solid #e2e8f0;
|
| 288 |
+
}
|
| 289 |
+
@media (max-width: 768px) {
|
| 290 |
+
.header-gradient h1 {
|
| 291 |
+
font-size: 1.8rem;
|
| 292 |
+
}
|
| 293 |
+
.header-gradient p {
|
| 294 |
+
font-size: 0.95rem;
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
</style>
|
| 298 |
<div class="header-gradient">
|
| 299 |
<h1>SNS Tech - Q&A Agent x Codeboosters Tech</h1>
|
| 300 |
<p><strong>AI-Powered Question Paper & Answer Key Generator</strong></p>
|