Manikandan-Alagu commited on
Commit
6487907
Β·
verified Β·
1 Parent(s): d5000ce

Update huggingfaceModel.py

Browse files
Files changed (1) hide show
  1. huggingfaceModel.py +8 -8
huggingfaceModel.py CHANGED
@@ -1,7 +1,7 @@
1
  import os
2
  from huggingface_hub import InferenceClient
3
 
4
- def generate_dropout_insights(input_values, risk_factors):
5
  """
6
  Generates structured dropout risk insights using AI, ensuring Unicode-safe text for PDFs.
7
  """
@@ -20,29 +20,29 @@ def generate_dropout_insights(input_values, risk_factors):
20
  {
21
  "role": "user",
22
  "content": f"""
23
- Generate a **detailed dropout risk analysis** report based on the following data:
24
 
25
  {formatted_input}
26
 
27
  Format the response as:
28
 
29
- ## **Analysis of Student Dropout Risk**
30
 
31
- **Overall Risk Level: {{risk_level}}**
32
 
33
- ### **🟒 Strengths:**
34
  List areas where the student is performing well:
35
  {{strengths}}
36
 
37
- ### **πŸ”΄ Concerns:**
38
  Identify factors that increase dropout risk:
39
  {{concerns}}
40
 
41
- ### **πŸ“Œ Action Plan for Improvement:**
42
  Provide targeted **solutions** based on the student's **weak areas**:
43
  {{recommendations}}
44
 
45
- ## **πŸ“ Final Recommendation:**
46
  {{overall_recommendation}}
47
  """
48
  }
 
1
  import os
2
  from huggingface_hub import InferenceClient
3
 
4
+ def generate_dropout_insights(input_values, risk_factors, label):
5
  """
6
  Generates structured dropout risk insights using AI, ensuring Unicode-safe text for PDFs.
7
  """
 
20
  {
21
  "role": "user",
22
  "content": f"""
23
+ Generate a detailed dropout risk analysis report based on the following data:
24
 
25
  {formatted_input}
26
 
27
  Format the response as:
28
 
29
+ ## Analysis of Student Dropout Risk
30
 
31
+ Overall Risk Level: {label}
32
 
33
+ ### 🟒 Strengths:
34
  List areas where the student is performing well:
35
  {{strengths}}
36
 
37
+ ### πŸ”΄ Concerns:
38
  Identify factors that increase dropout risk:
39
  {{concerns}}
40
 
41
+ ### πŸ“Œ Action Plan for Improvement:
42
  Provide targeted **solutions** based on the student's **weak areas**:
43
  {{recommendations}}
44
 
45
+ ## πŸ“ Final Recommendation:
46
  {{overall_recommendation}}
47
  """
48
  }