Spaces:
Sleeping
Sleeping
Add system and Python dependencies for chart generation (matplotlib fix)
Browse files- process_interview.py +5 -4
process_interview.py
CHANGED
|
@@ -23,11 +23,12 @@ from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Table, Tabl
|
|
| 23 |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
| 24 |
from reportlab.lib.units import inch
|
| 25 |
from reportlab.lib import colors
|
| 26 |
-
import matplotlib.pyplot as plt
|
| 27 |
-
import matplotlib
|
| 28 |
|
| 29 |
matplotlib.use('Agg') # --- FIX: تحديد backend لـ matplotlib ---
|
| 30 |
-
from reportlab.platypus import Image
|
|
|
|
| 31 |
# --- End Imports for enhanced PDF ---
|
| 32 |
from transformers import AutoTokenizer, AutoModel
|
| 33 |
import spacy
|
|
@@ -634,7 +635,7 @@ def generate_report(analysis_data: Dict) -> str:
|
|
| 634 |
{voice_interpretation}
|
| 635 |
|
| 636 |
**3. Content Analysis & Strengths/Areas for Development**
|
| 637 |
-
Analyze the key themes and identify both strengths and
|
| 638 |
Key responses from interviewee (for context):
|
| 639 |
{chr(10).join(interviewee_responses)}
|
| 640 |
|
|
|
|
| 23 |
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
|
| 24 |
from reportlab.lib.units import inch
|
| 25 |
from reportlab.lib import colors
|
| 26 |
+
import matplotlib.pyplot as plt
|
| 27 |
+
import matplotlib
|
| 28 |
|
| 29 |
matplotlib.use('Agg') # --- FIX: تحديد backend لـ matplotlib ---
|
| 30 |
+
from reportlab.platypus import Image
|
| 31 |
+
import io # --- FIX: إضافة import io لـ BytesIO ---
|
| 32 |
# --- End Imports for enhanced PDF ---
|
| 33 |
from transformers import AutoTokenizer, AutoModel
|
| 34 |
import spacy
|
|
|
|
| 635 |
{voice_interpretation}
|
| 636 |
|
| 637 |
**3. Content Analysis & Strengths/Areas for Development**
|
| 638 |
+
Analyze the key themes and identify both strengths and areas for development in the interviewee's responses.
|
| 639 |
Key responses from interviewee (for context):
|
| 640 |
{chr(10).join(interviewee_responses)}
|
| 641 |
|