capradeepgujaran commited on
Commit
3b17a53
1 Parent(s): 0b37d88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -28,7 +28,7 @@ class QuizGenerator:
28
  self.client = Groq(api_key=api_key)
29
 
30
  def generate_questions(self, text: str, num_questions: int) -> List[Question]:
31
- """Generate quiz questions using llama-3.2-3b-preview model"""
32
  prompt = self._create_prompt(text, num_questions)
33
 
34
  try:
@@ -44,7 +44,7 @@ class QuizGenerator:
44
  "content": prompt
45
  }
46
  ],
47
- model="llama-3.2-3b-preview",
48
  temperature=0,
49
  max_tokens=1024
50
  )
@@ -539,41 +539,54 @@ class QuizApp:
539
  self.fixed_content = """ATGC Transport and General Contracting LLC's Human Resources Policy and Procedures Manual serves as the definitive guide for personnel management within the organization. This comprehensive document defines policies and clarifies responsibilities to ensure consistent application of HR practices across all levels of the company. The manual applies to both permanent and temporary employees and has received approval from the Managing Director and Board of Directors. As a confidential document, unauthorized disclosure is strictly prohibited. The manual undergoes regular revisions to accommodate changes in company needs and UAE labor law, maintaining its relevance and flexibility.
540
  The Human Resources Department supports ATGC by providing strategic services through this manual, which aims to manage all aspects of staff relations in compliance with UAE regulations. It defines HR policies and procedures, outlines employee financial and administrative rights, facilitates teamwork and innovation, ensures proper planning and execution of HR processes, provides guidelines for recruitment and manpower planning, develops employee competencies, and creates a healthy work environment to enhance loyalty and team spirit.
541
  Manpower Planning and Budgeting
 
542
  ATGC implements strategic manpower planning to align workforce capacity with organizational goals and operational needs. This process begins with an annual workforce planning initiative led by the HR Director, who communicates the planning agenda and requirements to all department heads. Department heads then assess their current and future staffing needs based on project demands, operational goals, and strategic initiatives, completing detailed workforce planning forms that outline current staffing levels, vacancies, anticipated attrition, and skill gaps.
543
  The HR Director consolidates data from all departments to create a comprehensive organizational workforce plan, analyzing historical data and industry trends to forecast future requirements. This consolidated plan undergoes executive review and requires final approval from the Managing Director. The process includes detailed financial planning for workforce expenses, including salaries, benefits, training, and development costs.
544
  Recruitment and Onboarding
 
545
  The recruitment process at ATGC emphasizes finding qualified candidates who align with company values and objectives. The company utilizes both internal and external recruitment sources, with preference given to internal candidates when possible. Age criteria are clearly defined: 20-59 years for office staff and 20-55 years for site staff. The recruitment of relatives is generally restricted, though exceptions may be made in special cases with appropriate approval.
546
  The selection process includes comprehensive interviews, written and practical tests where applicable, and mandatory reference checks. All candidates must undergo medical examination prior to employment. Employment contracts are prepared in both Arabic and English, clearly outlining terms and conditions of employment. The onboarding process includes pre-arrival communication, comprehensive HR and departmental induction, system access setup, and initial training. New employees undergo a probation period of up to six months, during which their performance is closely monitored and evaluated.
547
  Employee Transfers, Secondments, and Acting Appointments
 
548
  ATGC maintains clear procedures for internal mobility through transfers, secondments, and acting appointments. Transfers require approval from both current and receiving managers, ensuring that operational needs are met while supporting employee development. Secondments are available for positions at equal or higher grades and include a 20% salary bonus when additional responsibilities are involved. Acting appointments allow employees to temporarily perform higher-level duties, providing development opportunities and ensuring operational continuity.
549
  Payroll, Working Hours, and Holidays
 
550
  The company operates on a six-day workweek, Monday through Saturday, with standard hours from 8:00 AM to 5:00 PM. A 15-minute grace period is allowed for morning arrival. Working hours are reduced during Ramadan in accordance with UAE customs and regulations. The salary structure differs based on employment date: newer employees receive 40% basic salary and 60% allowances, while those employed before February 2023 receive 60% basic salary and 40% allowances.
551
  Salaries are paid monthly through bank transfer, with overtime compensation provided according to UAE Labor Law requirements. Regular salary increments are based on performance evaluations and company guidelines. The payroll system carefully tracks attendance, overtime, and leave to ensure accurate compensation calculations.
552
  Allowances and Benefits
 
553
  ATGC provides a comprehensive benefits package including medical insurance for employees and their families, workmen's compensation insurance, and death and disability coverage. Housing benefits are provided either through company accommodation or housing allowances, depending on employee grade and position. Eligible employees may receive company cars for business use, and all employees are entitled to business travel allowances when required to work away from their primary location.
554
  Additional benefits include annual airline ticket allowances and uniform provision for specific positions. These benefits are designed to enhance employee welfare and maintain competitive compensation packages within the industry.
555
  Employee Code of Conduct and Office Etiquette
 
556
  The company maintains high standards for professional behavior through its Code of Conduct, which requires compliance with local and international laws, maintenance of confidentiality, prevention of conflicts of interest, and protection of company property. Employees must demonstrate professional behavior and ethics in all work-related activities.
557
  Office etiquette guidelines cover professional dress code requirements, workplace cleanliness standards, communication protocols, and appropriate technology usage. These standards help maintain a professional work environment and promote positive workplace relationships.
558
  Performance Management and Review
 
559
  ATGC implements a comprehensive performance management system centered on annual evaluations for permanent employees. Performance assessment is based on both Key Performance Indicators (KPIs) and behavioral factors, using a rating scale from A (Excellent) to D (Poor). The system includes provisions for performance improvement programs when necessary and helps identify training needs for employee development.
560
  Regular feedback and monitoring ensure that performance issues are addressed promptly and employees receive the support needed to meet expectations. The performance review process also influences decisions about promotions, salary increments, and other career development opportunities.
561
  Leave Entitlements and Management
 
562
  The company provides various types of leave to support work-life balance and employee wellbeing. Annual leave entitlement is 30 calendar days after one year of service, while sick leave allows up to 90 days per year with varying pay levels. Maternity leave provides 60 days for female employees, and paternity leave offers 5 days for new fathers.
563
  Additional leave types include bereavement leave (5 days), pilgrimage leave (5 days paid plus 25 days unpaid), educational leave (up to 10 days paid), and unpaid leave (maximum 30 days). All leave requests require proper documentation and approval through appropriate channels.
564
  Employee Relations and Documentation
 
565
  ATGC maintains robust systems for employee documentation, including employment verification, salary certificates, experience letters, and various other official documents. The company also implements a structured grievance procedure that begins with informal resolution attempts, followed by formal written complaints to HR if necessary. All grievances receive investigation and response within two days, with possible escalation to the CEO for unresolved issues.
566
  The company ensures protection against retaliation for employees who raise legitimate concerns and maintains confidentiality throughout the grievance process.
567
  Recognition and Awards
 
568
  Employee recognition is an important aspect of ATGC's HR policy, with various awards programs recognizing different types of achievement. These include performance awards for exceptional work, service loyalty awards for long-term commitment, team awards for group achievements, and special achievement awards for notable contributions to the company.
569
  Recognition takes multiple forms, including certificates, trophies, monetary bonuses, and additional paid time off. The awards system helps motivate employees and recognize outstanding contributions to the organization's success.
570
  Employment Separation
 
571
  The company maintains clear procedures for employment separation, whether through resignation, termination, or retirement. Resignations require 30 days' notice and include proper handover of duties, exit interviews, and return of company property. Termination procedures comply with UAE labor law and may occur with notice as per contract or immediately in cases of gross misconduct.
572
  End of service benefits are calculated based on length of service, with 21 days of basic salary per year for the first five years and 30 days per year thereafter. Payments are processed within 14 days of termination, subject to deduction of any outstanding dues.
573
  Authority Delegation
 
574
  ATGC maintains a clear delegation of authority structure for various HR functions. Recruitment authority flows from department heads through HR to final CEO approval. Salary administration requires multiple levels of review, with final approval from the Managing Director for significant changes. Leave administration follows a hierarchical approval process based on employee level and leave type.
575
  Training and development initiatives require department head initiation, HR review, and CEO approval, ensuring alignment with company objectives and budget constraints.
576
  Implementation and Compliance
 
577
  The manual emphasizes the importance of proper implementation and compliance with all policies. Regular reviews and updates ensure continued relevance and effectiveness of policies. The HR Department maintains responsibility for policy interpretation and implementation, with ultimate authority resting with the Managing Director and Board of Directors."""
578
 
579
  def get_certificate_title(self, base_title: str) -> str:
 
28
  self.client = Groq(api_key=api_key)
29
 
30
  def generate_questions(self, text: str, num_questions: int) -> List[Question]:
31
+ """Generate quiz questions using gemma2-9b-it"""
32
  prompt = self._create_prompt(text, num_questions)
33
 
34
  try:
 
44
  "content": prompt
45
  }
46
  ],
47
+ model="gemma2-9b-it",
48
  temperature=0,
49
  max_tokens=1024
50
  )
 
539
  self.fixed_content = """ATGC Transport and General Contracting LLC's Human Resources Policy and Procedures Manual serves as the definitive guide for personnel management within the organization. This comprehensive document defines policies and clarifies responsibilities to ensure consistent application of HR practices across all levels of the company. The manual applies to both permanent and temporary employees and has received approval from the Managing Director and Board of Directors. As a confidential document, unauthorized disclosure is strictly prohibited. The manual undergoes regular revisions to accommodate changes in company needs and UAE labor law, maintaining its relevance and flexibility.
540
  The Human Resources Department supports ATGC by providing strategic services through this manual, which aims to manage all aspects of staff relations in compliance with UAE regulations. It defines HR policies and procedures, outlines employee financial and administrative rights, facilitates teamwork and innovation, ensures proper planning and execution of HR processes, provides guidelines for recruitment and manpower planning, develops employee competencies, and creates a healthy work environment to enhance loyalty and team spirit.
541
  Manpower Planning and Budgeting
542
+
543
  ATGC implements strategic manpower planning to align workforce capacity with organizational goals and operational needs. This process begins with an annual workforce planning initiative led by the HR Director, who communicates the planning agenda and requirements to all department heads. Department heads then assess their current and future staffing needs based on project demands, operational goals, and strategic initiatives, completing detailed workforce planning forms that outline current staffing levels, vacancies, anticipated attrition, and skill gaps.
544
  The HR Director consolidates data from all departments to create a comprehensive organizational workforce plan, analyzing historical data and industry trends to forecast future requirements. This consolidated plan undergoes executive review and requires final approval from the Managing Director. The process includes detailed financial planning for workforce expenses, including salaries, benefits, training, and development costs.
545
  Recruitment and Onboarding
546
+
547
  The recruitment process at ATGC emphasizes finding qualified candidates who align with company values and objectives. The company utilizes both internal and external recruitment sources, with preference given to internal candidates when possible. Age criteria are clearly defined: 20-59 years for office staff and 20-55 years for site staff. The recruitment of relatives is generally restricted, though exceptions may be made in special cases with appropriate approval.
548
  The selection process includes comprehensive interviews, written and practical tests where applicable, and mandatory reference checks. All candidates must undergo medical examination prior to employment. Employment contracts are prepared in both Arabic and English, clearly outlining terms and conditions of employment. The onboarding process includes pre-arrival communication, comprehensive HR and departmental induction, system access setup, and initial training. New employees undergo a probation period of up to six months, during which their performance is closely monitored and evaluated.
549
  Employee Transfers, Secondments, and Acting Appointments
550
+
551
  ATGC maintains clear procedures for internal mobility through transfers, secondments, and acting appointments. Transfers require approval from both current and receiving managers, ensuring that operational needs are met while supporting employee development. Secondments are available for positions at equal or higher grades and include a 20% salary bonus when additional responsibilities are involved. Acting appointments allow employees to temporarily perform higher-level duties, providing development opportunities and ensuring operational continuity.
552
  Payroll, Working Hours, and Holidays
553
+
554
  The company operates on a six-day workweek, Monday through Saturday, with standard hours from 8:00 AM to 5:00 PM. A 15-minute grace period is allowed for morning arrival. Working hours are reduced during Ramadan in accordance with UAE customs and regulations. The salary structure differs based on employment date: newer employees receive 40% basic salary and 60% allowances, while those employed before February 2023 receive 60% basic salary and 40% allowances.
555
  Salaries are paid monthly through bank transfer, with overtime compensation provided according to UAE Labor Law requirements. Regular salary increments are based on performance evaluations and company guidelines. The payroll system carefully tracks attendance, overtime, and leave to ensure accurate compensation calculations.
556
  Allowances and Benefits
557
+
558
  ATGC provides a comprehensive benefits package including medical insurance for employees and their families, workmen's compensation insurance, and death and disability coverage. Housing benefits are provided either through company accommodation or housing allowances, depending on employee grade and position. Eligible employees may receive company cars for business use, and all employees are entitled to business travel allowances when required to work away from their primary location.
559
  Additional benefits include annual airline ticket allowances and uniform provision for specific positions. These benefits are designed to enhance employee welfare and maintain competitive compensation packages within the industry.
560
  Employee Code of Conduct and Office Etiquette
561
+
562
  The company maintains high standards for professional behavior through its Code of Conduct, which requires compliance with local and international laws, maintenance of confidentiality, prevention of conflicts of interest, and protection of company property. Employees must demonstrate professional behavior and ethics in all work-related activities.
563
  Office etiquette guidelines cover professional dress code requirements, workplace cleanliness standards, communication protocols, and appropriate technology usage. These standards help maintain a professional work environment and promote positive workplace relationships.
564
  Performance Management and Review
565
+
566
  ATGC implements a comprehensive performance management system centered on annual evaluations for permanent employees. Performance assessment is based on both Key Performance Indicators (KPIs) and behavioral factors, using a rating scale from A (Excellent) to D (Poor). The system includes provisions for performance improvement programs when necessary and helps identify training needs for employee development.
567
  Regular feedback and monitoring ensure that performance issues are addressed promptly and employees receive the support needed to meet expectations. The performance review process also influences decisions about promotions, salary increments, and other career development opportunities.
568
  Leave Entitlements and Management
569
+
570
  The company provides various types of leave to support work-life balance and employee wellbeing. Annual leave entitlement is 30 calendar days after one year of service, while sick leave allows up to 90 days per year with varying pay levels. Maternity leave provides 60 days for female employees, and paternity leave offers 5 days for new fathers.
571
  Additional leave types include bereavement leave (5 days), pilgrimage leave (5 days paid plus 25 days unpaid), educational leave (up to 10 days paid), and unpaid leave (maximum 30 days). All leave requests require proper documentation and approval through appropriate channels.
572
  Employee Relations and Documentation
573
+
574
  ATGC maintains robust systems for employee documentation, including employment verification, salary certificates, experience letters, and various other official documents. The company also implements a structured grievance procedure that begins with informal resolution attempts, followed by formal written complaints to HR if necessary. All grievances receive investigation and response within two days, with possible escalation to the CEO for unresolved issues.
575
  The company ensures protection against retaliation for employees who raise legitimate concerns and maintains confidentiality throughout the grievance process.
576
  Recognition and Awards
577
+
578
  Employee recognition is an important aspect of ATGC's HR policy, with various awards programs recognizing different types of achievement. These include performance awards for exceptional work, service loyalty awards for long-term commitment, team awards for group achievements, and special achievement awards for notable contributions to the company.
579
  Recognition takes multiple forms, including certificates, trophies, monetary bonuses, and additional paid time off. The awards system helps motivate employees and recognize outstanding contributions to the organization's success.
580
  Employment Separation
581
+
582
  The company maintains clear procedures for employment separation, whether through resignation, termination, or retirement. Resignations require 30 days' notice and include proper handover of duties, exit interviews, and return of company property. Termination procedures comply with UAE labor law and may occur with notice as per contract or immediately in cases of gross misconduct.
583
  End of service benefits are calculated based on length of service, with 21 days of basic salary per year for the first five years and 30 days per year thereafter. Payments are processed within 14 days of termination, subject to deduction of any outstanding dues.
584
  Authority Delegation
585
+
586
  ATGC maintains a clear delegation of authority structure for various HR functions. Recruitment authority flows from department heads through HR to final CEO approval. Salary administration requires multiple levels of review, with final approval from the Managing Director for significant changes. Leave administration follows a hierarchical approval process based on employee level and leave type.
587
  Training and development initiatives require department head initiation, HR review, and CEO approval, ensuring alignment with company objectives and budget constraints.
588
  Implementation and Compliance
589
+
590
  The manual emphasizes the importance of proper implementation and compliance with all policies. Regular reviews and updates ensure continued relevance and effectiveness of policies. The HR Department maintains responsibility for policy interpretation and implementation, with ultimate authority resting with the Managing Director and Board of Directors."""
591
 
592
  def get_certificate_title(self, base_title: str) -> str: