mtyrrell commited on
Commit
3e7dd62
·
1 Parent(s): aa07439

Reports tooltip & Guidelines revision

Browse files
Files changed (2) hide show
  1. app.py +21 -13
  2. style.css +49 -16
app.py CHANGED
@@ -409,7 +409,11 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
409
  #---------------- tab for REPORTS SELECTION ----------------------
410
 
411
  with gr.Tab("Reports",elem_id = "tab-config",id = 2):
412
- gr.Markdown("Reminder: To get better results select the specific report/reports")
 
 
 
 
413
 
414
 
415
  #----- First level filter for selecting Report source/category ----------
@@ -501,28 +505,32 @@ with gr.Blocks(title="Audit Q&A", css= "style.css", theme=theme,elem_id = "main-
501
  with gr.Tab("Guidelines", elem_classes="max-height other-tabs"):
502
  gr.Markdown("""
503
 
504
- Welcome to Audit Q&A, your AI-powered assistant for exploring and understanding Uganda's audit reports. This tool leverages advanced language models to help you get clear and structured answers based on audit publications. To get you started, here a few tips on how to use the tool:
 
 
 
 
505
 
506
- ### Crafting Effective Prompts
 
 
 
 
 
 
507
 
508
  - **Be Clear and Specific**: Frame your questions clearly and focus on what you want to learn.
509
  - **One Topic at a Time**: Break complex queries into simpler, focused questions.
510
- - **Be Direct**: Instead of "What are the findings?", try "What were the main issues identified in procurement practices?" or "What challenges were found in revenue collection?"
 
511
 
512
- ### Best Practices
513
-
514
- - Start with a simple, focused question.
515
- - Follow up with additional questions if your initial query doesn't yield the desired results.
516
- - Experiment with different phrasings to get the most accurate answers.
517
- - Use the source citations as a reference to validate the provided information.
518
-
519
- ### Utilizing Filters
520
 
521
  - **Report Category & Subtype**: Use the "Reports" tab to choose your preferred report category and refine your query by selecting a specific sub-type. This will help narrow down the context for your question.
522
  - **Year Selection**: Choose one or more years from the "Year" filter to target your query to specific time periods.
523
  - **Specific Reports**: Optionally, select specific reports using the dropdown to focus on a particular document or set of documents.
524
 
525
- ### Useful Resources
526
 
527
  - <ins>[**Short Course: Generative AI for Everyone** (3 hours)](https://www.deeplearning.ai/courses/generative-ai-for-everyone/)</ins>
528
  - <ins>[**Short Course: Advanced Prompting** (1 hour)](https://www.deeplearning.ai/courses/ai-for-everyone/)</ins>
 
409
  #---------------- tab for REPORTS SELECTION ----------------------
410
 
411
  with gr.Tab("Reports",elem_id = "tab-config",id = 2):
412
+ with gr.Row():
413
+ gr.Markdown("Reminder: To get better results select the specific report/reports")
414
+ gr.Markdown("""<div class="question-tooltip">?
415
+ <div class="tooltip-content">Select the audit reports that you want to analyse directly or browse through categories and select reports</div>
416
+ </div>""", elem_id="reports-tooltip")
417
 
418
 
419
  #----- First level filter for selecting Report source/category ----------
 
505
  with gr.Tab("Guidelines", elem_classes="max-height other-tabs"):
506
  gr.Markdown("""
507
 
508
+ #### Welcome to Audit Q&A, your AI-powered assistant for exploring and understanding Uganda's audit reports. This tool leverages advanced language models to help you get clear and structured answers based on audit publications. To get you started, here a few tips on how to use the tool:
509
+
510
+ ## 💬 Crafting Effective Prompts
511
+
512
+ Clear, specific questions will give you the best results. Here are some examples:
513
 
514
+ | Less Effective | ✅ More Effective |
515
+ |------------------|-------------------|
516
+ | "What are the findings?" | "What were the main issues identified in procurement practices in the Ministry of Health in 2022?" |
517
+ | "Tell me about revenue collection" | "What specific challenges were identified in revenue collection at the local government level in 2021-2022?" |
518
+ | "Is there corruption?" | "What audit findings related to misappropriation of funds were reported in the education sector between 2020-2023?" |
519
+
520
+ ## Best Practices
521
 
522
  - **Be Clear and Specific**: Frame your questions clearly and focus on what you want to learn.
523
  - **One Topic at a Time**: Break complex queries into simpler, focused questions.
524
+ - **Provide Context**: Mentioning specific ministries, years, or projects helps narrow the focus.
525
+ - **Follow Up**: Ask follow-up questions to explore a topic more deeply.
526
 
527
+ ## Utilizing Filters
 
 
 
 
 
 
 
528
 
529
  - **Report Category & Subtype**: Use the "Reports" tab to choose your preferred report category and refine your query by selecting a specific sub-type. This will help narrow down the context for your question.
530
  - **Year Selection**: Choose one or more years from the "Year" filter to target your query to specific time periods.
531
  - **Specific Reports**: Optionally, select specific reports using the dropdown to focus on a particular document or set of documents.
532
 
533
+ ## Useful Resources
534
 
535
  - <ins>[**Short Course: Generative AI for Everyone** (3 hours)](https://www.deeplearning.ai/courses/generative-ai-for-everyone/)</ins>
536
  - <ins>[**Short Course: Advanced Prompting** (1 hour)](https://www.deeplearning.ai/courses/ai-for-everyone/)</ins>
style.css CHANGED
@@ -473,7 +473,7 @@ span.chatbot > p > img{
473
  #warning-row.warning-message span.warning-icon,
474
  #warning-row.warning-message .prose span.warning-icon {
475
  font-size: 1.7em !important;
476
- color: #856404 !important;
477
  margin-right: 10px !important;
478
  display: inline-block !important;
479
  vertical-align: middle !important;
@@ -484,12 +484,14 @@ span.chatbot > p > img{
484
  font-size: 14px !important;
485
  line-height: 1.5 !important;
486
  font-weight: bold;
 
487
  }
488
 
489
  #warning-row.warning-message {
490
  padding: 20px 25px !important;
491
  }
492
 
 
493
  #warning-row .warning-buttons {
494
  display: flex;
495
  justify-content: center;
@@ -525,29 +527,60 @@ span.chatbot > p > img{
525
  background-color: #d0d0d0;
526
  }
527
 
528
- /* Dark mode support */
529
- body.dark #warning-row {
530
- background-color: #382f22;
531
- border-color: #6b5b30;
 
 
 
 
 
 
 
 
 
 
 
532
  }
533
 
534
- body.dark #warning-row p,
535
- body.dark #warning-row .warning-content,
536
- body.dark #warning-row .warning-icon {
537
- color: #ffd866;
 
 
 
 
 
 
 
 
 
 
 
 
 
538
  }
539
 
540
- body.dark #warning-row button.cancel {
541
- background-color: #4a4a4a;
542
- color: #e0e0e0;
543
- border-color: #555;
544
  }
545
 
546
- @keyframes fadeIn {
547
- from { opacity: 0; transform: translateY(-10px); }
548
- to { opacity: 1; transform: translateY(0); }
 
 
 
 
 
 
 
549
  }
550
 
551
 
552
 
553
 
 
 
473
  #warning-row.warning-message span.warning-icon,
474
  #warning-row.warning-message .prose span.warning-icon {
475
  font-size: 1.7em !important;
476
+ color: #000000 !important;
477
  margin-right: 10px !important;
478
  display: inline-block !important;
479
  vertical-align: middle !important;
 
484
  font-size: 14px !important;
485
  line-height: 1.5 !important;
486
  font-weight: bold;
487
+ color: #000000 !important; /* Ensure text is always visible */
488
  }
489
 
490
  #warning-row.warning-message {
491
  padding: 20px 25px !important;
492
  }
493
 
494
+
495
  #warning-row .warning-buttons {
496
  display: flex;
497
  justify-content: center;
 
527
  background-color: #d0d0d0;
528
  }
529
 
530
+
531
+ /* Tooltip styling (report tab)*/
532
+ .question-tooltip {
533
+ display: inline-flex;
534
+ justify-content: center;
535
+ align-items: center;
536
+ width: 24px;
537
+ height: 24px;
538
+ background-color: #ffd866;
539
+ color: #333;
540
+ border-radius: 50%;
541
+ cursor: help;
542
+ position: relative;
543
+ margin-left: 8px;
544
+ font-weight: bold;
545
  }
546
 
547
+ .question-tooltip .tooltip-content {
548
+ visibility: hidden;
549
+ width: 300px;
550
+ background-color: #333;
551
+ color: #fff;
552
+ text-align: center;
553
+ border-radius: 6px;
554
+ padding: 10px;
555
+ position: absolute;
556
+ z-index: 9999;
557
+ top: 120%;
558
+ left: 50%;
559
+ transform: translateX(-50%);
560
+ opacity: 0;
561
+ transition: opacity 0.3s;
562
+ font-weight: normal;
563
+ box-shadow: 0 4px 8px rgba(0,0,0,0.2);
564
  }
565
 
566
+ .question-tooltip:hover .tooltip-content {
567
+ visibility: visible;
568
+ opacity: 1;
 
569
  }
570
 
571
+ /* Arrow for tooltip */
572
+ .question-tooltip .tooltip-content::after {
573
+ content: "";
574
+ position: absolute;
575
+ bottom: 100%;
576
+ left: 50%;
577
+ margin-left: -5px;
578
+ border-width: 5px;
579
+ border-style: solid;
580
+ border-color: transparent transparent #333 transparent;
581
  }
582
 
583
 
584
 
585
 
586
+