Nischal Subedi
commited on
Commit
·
229d1b2
1
Parent(s):
7c7cb71
adding footnote
Browse files
app.py
CHANGED
@@ -262,151 +262,161 @@ Answer:"""
|
|
262 |
.gr-form {
|
263 |
max-width: 900px;
|
264 |
margin: 0 auto;
|
265 |
-
padding:
|
266 |
-
background
|
267 |
-
border-radius:
|
268 |
-
box-shadow: 0
|
269 |
}
|
270 |
.gr-title {
|
271 |
-
font-size:
|
272 |
-
font-weight:
|
273 |
-
color: #
|
274 |
text-align: center;
|
275 |
margin-bottom: 10px;
|
|
|
276 |
}
|
277 |
.gr-description {
|
278 |
font-size: 1.1em;
|
279 |
-
color: #
|
280 |
text-align: center;
|
281 |
margin-bottom: 30px;
|
|
|
282 |
}
|
283 |
.footnote {
|
284 |
-
font-size:
|
285 |
-
color: #
|
286 |
text-align: center;
|
287 |
-
margin-top:
|
288 |
-
padding-top:
|
289 |
-
border-top: 1px solid #
|
290 |
}
|
291 |
.footnote a {
|
292 |
-
color: #
|
293 |
text-decoration: none;
|
|
|
294 |
transition: color 0.3s ease;
|
295 |
}
|
296 |
.footnote a:hover {
|
297 |
-
color: #
|
298 |
text-decoration: underline;
|
299 |
}
|
300 |
.gr-textbox, .gr-dropdown {
|
301 |
-
border: 1px solid #
|
302 |
-
border-radius:
|
303 |
padding: 12px !important;
|
304 |
font-size: 1em !important;
|
305 |
-
|
|
|
306 |
}
|
307 |
.gr-textbox:focus, .gr-dropdown:focus {
|
308 |
-
border-color: #
|
309 |
-
box-shadow: 0 0
|
|
|
310 |
}
|
311 |
.gr-textbox label, .gr-dropdown label {
|
312 |
font-weight: 600;
|
313 |
-
color: #
|
314 |
margin-bottom: 8px;
|
315 |
}
|
316 |
.gr-button-primary {
|
317 |
-
background
|
318 |
border: none !important;
|
319 |
padding: 12px 30px !important;
|
320 |
-
font-weight:
|
321 |
font-size: 1em !important;
|
322 |
-
border-radius:
|
323 |
-
|
|
|
324 |
}
|
325 |
.gr-button-primary:hover {
|
326 |
-
|
327 |
-
|
328 |
}
|
329 |
.gr-button-secondary {
|
330 |
-
background
|
331 |
border: none !important;
|
332 |
padding: 12px 30px !important;
|
333 |
-
font-weight:
|
334 |
font-size: 1em !important;
|
335 |
-
border-radius:
|
336 |
-
|
|
|
337 |
}
|
338 |
.gr-button-secondary:hover {
|
339 |
-
|
|
|
340 |
}
|
341 |
.output-markdown {
|
342 |
-
background
|
343 |
-
color: #
|
344 |
padding: 25px !important;
|
345 |
-
border-radius:
|
346 |
-
border: 1px solid #
|
347 |
font-size: 1.1em !important;
|
348 |
line-height: 1.8 !important;
|
349 |
-
box-shadow: 0 2px
|
350 |
}
|
351 |
.gr-examples {
|
352 |
-
background
|
353 |
-
padding:
|
354 |
-
border-radius:
|
355 |
-
margin-top:
|
|
|
356 |
}
|
357 |
.gr-examples table {
|
358 |
background-color: transparent !important;
|
359 |
}
|
360 |
@media (prefers-color-scheme: dark) {
|
361 |
.gr-form {
|
362 |
-
background
|
363 |
-
box-shadow: 0
|
364 |
}
|
365 |
.gr-title {
|
366 |
-
color: #
|
367 |
}
|
368 |
.gr-description {
|
369 |
-
color: #
|
370 |
}
|
371 |
.footnote {
|
372 |
-
color: #
|
373 |
-
border-top: 1px solid #
|
374 |
}
|
375 |
.footnote a {
|
376 |
-
color: #
|
377 |
}
|
378 |
.footnote a:hover {
|
379 |
-
color: #
|
380 |
}
|
381 |
.gr-textbox, .gr-dropdown {
|
382 |
-
background-color: #
|
383 |
-
color: #
|
384 |
-
border-color: #
|
385 |
}
|
386 |
.gr-textbox label, .gr-dropdown label {
|
387 |
-
color: #
|
388 |
}
|
389 |
.output-markdown {
|
390 |
-
background
|
391 |
-
color: #
|
392 |
-
border-color: #
|
393 |
}
|
394 |
.gr-examples {
|
395 |
-
background
|
|
|
396 |
}
|
397 |
}
|
398 |
@media (max-width: 600px) {
|
399 |
.gr-form {
|
400 |
-
padding:
|
401 |
}
|
402 |
.gr-title {
|
403 |
-
font-size:
|
404 |
}
|
405 |
.gr-description {
|
406 |
font-size: 1em;
|
407 |
}
|
408 |
.footnote {
|
409 |
-
font-size:
|
410 |
}
|
411 |
.gr-textbox, .gr-dropdown {
|
412 |
font-size: 0.9em !important;
|
@@ -427,8 +437,6 @@ Answer:"""
|
|
427 |
"""
|
428 |
# 🏠 Landlord-Tenant Rights Bot
|
429 |
Ask questions about tenant rights and landlord-tenant laws based on state-specific legal documents. Provide your OpenAI API key, select a state, and enter your question below. You can get an API key from [OpenAI](https://platform.openai.com/api-keys).
|
430 |
-
|
431 |
-
# <div class='footnote'>Developed by Nischal Subedi. Follow me on <a href='https://www.linkedin.com/in/nischal1/' target='_blank'>LinkedIn</a> or read my insights on <a href='https://datascientistinsights.substack.com/' target='_blank'>Substack</a>.</div>
|
432 |
"""
|
433 |
)
|
434 |
|
@@ -470,6 +478,12 @@ Answer:"""
|
|
470 |
examples_per_page=5
|
471 |
)
|
472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
submit_button.click(
|
474 |
fn=query_interface,
|
475 |
inputs=[api_key_input, query_input, state_input],
|
|
|
262 |
.gr-form {
|
263 |
max-width: 900px;
|
264 |
margin: 0 auto;
|
265 |
+
padding: 30px;
|
266 |
+
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
|
267 |
+
border-radius: 20px;
|
268 |
+
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
|
269 |
}
|
270 |
.gr-title {
|
271 |
+
font-size: 2.8em;
|
272 |
+
font-weight: 700;
|
273 |
+
color: #1a3c34;
|
274 |
text-align: center;
|
275 |
margin-bottom: 10px;
|
276 |
+
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
|
277 |
}
|
278 |
.gr-description {
|
279 |
font-size: 1.1em;
|
280 |
+
color: #4a5e57;
|
281 |
text-align: center;
|
282 |
margin-bottom: 30px;
|
283 |
+
line-height: 1.6;
|
284 |
}
|
285 |
.footnote {
|
286 |
+
font-size: 0.9em;
|
287 |
+
color: #6b7280;
|
288 |
text-align: center;
|
289 |
+
margin-top: 40px;
|
290 |
+
padding-top: 15px;
|
291 |
+
border-top: 1px solid #e5e7eb;
|
292 |
}
|
293 |
.footnote a {
|
294 |
+
color: #2563eb;
|
295 |
text-decoration: none;
|
296 |
+
font-weight: 500;
|
297 |
transition: color 0.3s ease;
|
298 |
}
|
299 |
.footnote a:hover {
|
300 |
+
color: #1d4ed8;
|
301 |
text-decoration: underline;
|
302 |
}
|
303 |
.gr-textbox, .gr-dropdown {
|
304 |
+
border: 1px solid #d1d5db !important;
|
305 |
+
border-radius: 10px !important;
|
306 |
padding: 12px !important;
|
307 |
font-size: 1em !important;
|
308 |
+
background-color: #fff !important;
|
309 |
+
transition: border-color 0.3s ease, box-shadow 0.3s ease;
|
310 |
}
|
311 |
.gr-textbox:focus, .gr-dropdown:focus {
|
312 |
+
border-color: #2563eb !important;
|
313 |
+
box-shadow: 0 0 8px rgba(37, 99, 235, 0.2) !important;
|
314 |
+
outline: none !important;
|
315 |
}
|
316 |
.gr-textbox label, .gr-dropdown label {
|
317 |
font-weight: 600;
|
318 |
+
color: #1a3c34;
|
319 |
margin-bottom: 8px;
|
320 |
}
|
321 |
.gr-button-primary {
|
322 |
+
background: linear-gradient(90deg, #f97316 0%, #ea580c 100%) !important;
|
323 |
border: none !important;
|
324 |
padding: 12px 30px !important;
|
325 |
+
font-weight: 600 !important;
|
326 |
font-size: 1em !important;
|
327 |
+
border-radius: 10px !important;
|
328 |
+
color: #fff !important;
|
329 |
+
transition: transform 0.2s ease, box-shadow 0.3s ease;
|
330 |
}
|
331 |
.gr-button-primary:hover {
|
332 |
+
transform: translateY(-3px);
|
333 |
+
box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3) !important;
|
334 |
}
|
335 |
.gr-button-secondary {
|
336 |
+
background: linear-gradient(90deg, #6b7280 0%, #4b5563 100%) !important;
|
337 |
border: none !important;
|
338 |
padding: 12px 30px !important;
|
339 |
+
font-weight: 600 !important;
|
340 |
font-size: 1em !important;
|
341 |
+
border-radius: 10px !important;
|
342 |
+
color: #fff !important;
|
343 |
+
transition: transform 0.2s ease, box-shadow 0.3s ease;
|
344 |
}
|
345 |
.gr-button-secondary:hover {
|
346 |
+
transform: translateY(-3px);
|
347 |
+
box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3) !important;
|
348 |
}
|
349 |
.output-markdown {
|
350 |
+
background: #f9fafb !important;
|
351 |
+
color: #1f2937 !important;
|
352 |
padding: 25px !important;
|
353 |
+
border-radius: 12px !important;
|
354 |
+
border: 1px solid #e5e7eb !important;
|
355 |
font-size: 1.1em !important;
|
356 |
line-height: 1.8 !important;
|
357 |
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
|
358 |
}
|
359 |
.gr-examples {
|
360 |
+
background: #f1f5f9;
|
361 |
+
padding: 20px;
|
362 |
+
border-radius: 12px;
|
363 |
+
margin-top: 25px;
|
364 |
+
border: 1px solid #e5e7eb;
|
365 |
}
|
366 |
.gr-examples table {
|
367 |
background-color: transparent !important;
|
368 |
}
|
369 |
@media (prefers-color-scheme: dark) {
|
370 |
.gr-form {
|
371 |
+
background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
|
372 |
+
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
|
373 |
}
|
374 |
.gr-title {
|
375 |
+
color: #f3f4f6;
|
376 |
}
|
377 |
.gr-description {
|
378 |
+
color: #d1d5db;
|
379 |
}
|
380 |
.footnote {
|
381 |
+
color: #9ca3af;
|
382 |
+
border-top: 1px solid #4b5563;
|
383 |
}
|
384 |
.footnote a {
|
385 |
+
color: #60a5fa;
|
386 |
}
|
387 |
.footnote a:hover {
|
388 |
+
color: #3b82f6;
|
389 |
}
|
390 |
.gr-textbox, .gr-dropdown {
|
391 |
+
background-color: #374151 !important;
|
392 |
+
color: #f3f4f6 !important;
|
393 |
+
border-color: #4b5563 !important;
|
394 |
}
|
395 |
.gr-textbox label, .gr-dropdown label {
|
396 |
+
color: #f3f4f6;
|
397 |
}
|
398 |
.output-markdown {
|
399 |
+
background: #374151 !important;
|
400 |
+
color: #f3f4f6 !important;
|
401 |
+
border-color: #4b5563 !important;
|
402 |
}
|
403 |
.gr-examples {
|
404 |
+
background: #4b5563;
|
405 |
+
border-color: #6b7280;
|
406 |
}
|
407 |
}
|
408 |
@media (max-width: 600px) {
|
409 |
.gr-form {
|
410 |
+
padding: 20px;
|
411 |
}
|
412 |
.gr-title {
|
413 |
+
font-size: 2em;
|
414 |
}
|
415 |
.gr-description {
|
416 |
font-size: 1em;
|
417 |
}
|
418 |
.footnote {
|
419 |
+
font-size: 0.85em;
|
420 |
}
|
421 |
.gr-textbox, .gr-dropdown {
|
422 |
font-size: 0.9em !important;
|
|
|
437 |
"""
|
438 |
# 🏠 Landlord-Tenant Rights Bot
|
439 |
Ask questions about tenant rights and landlord-tenant laws based on state-specific legal documents. Provide your OpenAI API key, select a state, and enter your question below. You can get an API key from [OpenAI](https://platform.openai.com/api-keys).
|
|
|
|
|
440 |
"""
|
441 |
)
|
442 |
|
|
|
478 |
examples_per_page=5
|
479 |
)
|
480 |
|
481 |
+
gr.Markdown(
|
482 |
+
"""
|
483 |
+
<div class='footnote'>Developed by Nischal Subedi. Follow me on <a href='https://www.linkedin.com/in/nischal1/' target='_blank'>LinkedIn</a> or read my insights on <a href='https://datascientistinsights.substack.com/' target='_blank'>Substack</a>.</div>
|
484 |
+
"""
|
485 |
+
)
|
486 |
+
|
487 |
submit_button.click(
|
488 |
fn=query_interface,
|
489 |
inputs=[api_key_input, query_input, state_input],
|