Create app.ipynb
Browse files
app.ipynb
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
def recommend_training(employee_name, technical_competence, behavioral_competence, feedback):
|
| 5 |
+
data_analysis_skills = (technical_competence + behavioral_competence) / 2
|
| 6 |
+
|
| 7 |
+
if data_analysis_skills >= 4.5:
|
| 8 |
+
recommendation = f"Congratulations {employee_name}! Your data analysis skills are exceptional. Keep leveraging tools like Power BI to visualize insights and consider advanced courses in statistical analysis. For more information, check out these resources: [Advanced Statistical Analysis Course](https://example.com/statistical-analysis-course), [Power BI Documentation](https://docs.microsoft.com/en-us/power-bi/)."
|
| 9 |
+
elif 3.5 <= data_analysis_skills < 4.5:
|
| 10 |
+
recommendation = f"Well done {employee_name}! Your data analysis skills are good. Consider diving deeper into Power BI functionalities and attending workshops on data storytelling. For more information, check out these resources: [Power BI Workshops](https://example.com/power-bi-workshops), [Data Storytelling Guide](https://example.com/data-storytelling-guide)."
|
| 11 |
+
elif 2.5 <= data_analysis_skills < 3.5:
|
| 12 |
+
recommendation = f"{employee_name}, there's room for improvement in your data analysis skills. We recommend focusing on mastering Power BI for more advanced data visualization techniques. For more information, check out these resources: [Mastering Power BI Course](https://example.com/power-bi-course), [Data Visualization Best Practices](https://example.com/data-visualization-best-practices)."
|
| 13 |
+
else:
|
| 14 |
+
recommendation = f"{employee_name}, your data analysis skills need significant improvement. We suggest enrolling in comprehensive training programs covering Power BI and basic statistical analysis. For more information, check out these resources: [Comprehensive Power BI Training](https://example.com/power-bi-training), [Basic Statistical Analysis Course](https://example.com/statistical-analysis-course)."
|
| 15 |
+
return recommendation
|
| 16 |
+
|
| 17 |
+
# Creating Gradio interface
|
| 18 |
+
interface = gr.Interface(
|
| 19 |
+
fn=recommend_training,
|
| 20 |
+
inputs=[
|
| 21 |
+
gr.Textbox(label="Employee Name"),
|
| 22 |
+
gr.Slider(minimum=0, maximum=5, label="Technical Competence (out of 5)"),
|
| 23 |
+
gr.Slider(minimum=0, maximum=5, label="Behavioral Competence (out of 5)"),
|
| 24 |
+
gr.Textbox(label="Appraisee and Manager's Feedback")
|
| 25 |
+
],
|
| 26 |
+
outputs=gr.Textbox(label="Recommendation"),
|
| 27 |
+
title="Data Analyst Performance Recommendation Engine",
|
| 28 |
+
description="Enter the Data Analyst's name, technical competence, behavioral competence, and appraisee and manager's feedback to receive recommendations for the next quarter.",
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
+
interface.launch()
|