Update app.py
Browse files
app.py
CHANGED
|
@@ -245,7 +245,7 @@ def generate_insights(state: EvaluationState) -> EvaluationState:
|
|
| 245 |
overall_info += f"Total Responses: {processed_data['overall']['total_responses']}"
|
| 246 |
|
| 247 |
prompt = ChatPromptTemplate.from_messages([
|
| 248 |
-
("system", """You are an expert
|
| 249 |
Format your response in Markdown.
|
| 250 |
|
| 251 |
Your analysis should cover:
|
|
@@ -426,7 +426,7 @@ def compile_report(state: EvaluationState) -> EvaluationState:
|
|
| 426 |
</style>
|
| 427 |
</head>
|
| 428 |
<body>
|
| 429 |
-
<h1>
|
| 430 |
|
| 431 |
<div class="stats-container">
|
| 432 |
<div class="stat-card">
|
|
@@ -563,22 +563,22 @@ def generate_report_gradio(file_obj):
|
|
| 563 |
# --- GRADIO APP USING gr.Blocks ---
|
| 564 |
|
| 565 |
with gr.Blocks(
|
| 566 |
-
title="
|
| 567 |
theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary_hue=gr.themes.colors.sky)
|
| 568 |
) as app:
|
| 569 |
gr.Markdown(
|
| 570 |
"""
|
| 571 |
-
# 📊
|
| 572 |
-
Upload
|
| 573 |
Required columns: `subject`, `feedback_rating` (1-5), `instructor_rating` (1-5).
|
| 574 |
-
|
| 575 |
"""
|
| 576 |
)
|
| 577 |
|
| 578 |
with gr.Row():
|
| 579 |
with gr.Column(scale=1, min_width=300): # Input column
|
| 580 |
file_input = gr.File(
|
| 581 |
-
label="Upload
|
| 582 |
file_types=['.csv', '.xls', '.xlsx'],
|
| 583 |
# type="filepath" # 'filepath' is often better for NamedTemporaryFile
|
| 584 |
)
|
|
|
|
| 245 |
overall_info += f"Total Responses: {processed_data['overall']['total_responses']}"
|
| 246 |
|
| 247 |
prompt = ChatPromptTemplate.from_messages([
|
| 248 |
+
("system", """You are an expert data analyst . Your task is to analyze employees evaluation data and provide comprehensive, actionable insights.
|
| 249 |
Format your response in Markdown.
|
| 250 |
|
| 251 |
Your analysis should cover:
|
|
|
|
| 426 |
</style>
|
| 427 |
</head>
|
| 428 |
<body>
|
| 429 |
+
<h1>Employee Evaluation Analysis Report</h1>
|
| 430 |
|
| 431 |
<div class="stats-container">
|
| 432 |
<div class="stat-card">
|
|
|
|
| 563 |
# --- GRADIO APP USING gr.Blocks ---
|
| 564 |
|
| 565 |
with gr.Blocks(
|
| 566 |
+
title="Evaluation Analytics System",
|
| 567 |
theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary_hue=gr.themes.colors.sky)
|
| 568 |
) as app:
|
| 569 |
gr.Markdown(
|
| 570 |
"""
|
| 571 |
+
# 📊 Formation Evaluation Analytics Dashboard
|
| 572 |
+
Upload evaluation data (CSV or Excel format) to generate an interactive report.
|
| 573 |
Required columns: `subject`, `feedback_rating` (1-5), `instructor_rating` (1-5).
|
| 574 |
+
|
| 575 |
"""
|
| 576 |
)
|
| 577 |
|
| 578 |
with gr.Row():
|
| 579 |
with gr.Column(scale=1, min_width=300): # Input column
|
| 580 |
file_input = gr.File(
|
| 581 |
+
label="Upload Evaluation Data",
|
| 582 |
file_types=['.csv', '.xls', '.xlsx'],
|
| 583 |
# type="filepath" # 'filepath' is often better for NamedTemporaryFile
|
| 584 |
)
|