WaysAhead Global commited on
Commit
eff4325
·
verified ·
1 Parent(s): 594e9e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -49,39 +49,43 @@ store_categories = {
49
  "REN by Sushi Library", "Sushi Library", "Tim Hortons", "LM Exchange"]
50
  }
51
 
52
- # ✅ CrewAI Agents & Tasks
53
  cleaning_agent = Agent(
54
- role="Data Cleaning Agent",
55
  goal="Ensure data quality by handling missing values and duplicates.",
56
- backstory="An expert in data preprocessing, ensuring high-quality input for analysis.",
57
  llm=ChatOpenAI(model="gpt-4"),
58
  allow_delegation=True
59
  )
60
 
61
  competitor_agent = Agent(
62
- role="Competitor Analysis Agent",
63
  goal="Fetch competitors for the selected mall or generate AI-based fallback.",
 
64
  llm=ChatOpenAI(model="gpt-4"),
65
  allow_delegation=True
66
  )
67
 
68
  replacement_agent = Agent(
69
- role="Store Replacement Agent",
70
  goal="Find the best replacement stores matching the selected store’s category.",
 
71
  llm=ChatOpenAI(model="gpt-4"),
72
  allow_delegation=True
73
  )
74
 
75
  prediction_agent = Agent(
76
- role="KPI Prediction Agent",
77
  goal="Use AutoML to predict sales, footfall, conversion rate, and margins.",
 
78
  llm=ChatOpenAI(model="gpt-4"),
79
  allow_delegation=True
80
  )
81
 
82
  chatbot_agent = Agent(
83
- role="Conversational AI Agent",
84
  goal="Answer business-related queries about the dataset.",
 
85
  llm=ChatOpenAI(model="gpt-4"),
86
  allow_delegation=True
87
  )
 
49
  "REN by Sushi Library", "Sushi Library", "Tim Hortons", "LM Exchange"]
50
  }
51
 
52
+ # ✅ CrewAI Agents & Tasks with Backstories
53
  cleaning_agent = Agent(
54
+ role="Data Cleaning Expert",
55
  goal="Ensure data quality by handling missing values and duplicates.",
56
+ backstory="A seasoned data scientist who specializes in cleaning and structuring large datasets.",
57
  llm=ChatOpenAI(model="gpt-4"),
58
  allow_delegation=True
59
  )
60
 
61
  competitor_agent = Agent(
62
+ role="Competitor Analyst",
63
  goal="Fetch competitors for the selected mall or generate AI-based fallback.",
64
+ backstory="A retail market expert who analyzes competitors and provides key insights for store replacements.",
65
  llm=ChatOpenAI(model="gpt-4"),
66
  allow_delegation=True
67
  )
68
 
69
  replacement_agent = Agent(
70
+ role="Store Replacement Specialist",
71
  goal="Find the best replacement stores matching the selected store’s category.",
72
+ backstory="An AI-powered retail strategist with expertise in category-based store recommendations.",
73
  llm=ChatOpenAI(model="gpt-4"),
74
  allow_delegation=True
75
  )
76
 
77
  prediction_agent = Agent(
78
+ role="AI KPI Forecaster",
79
  goal="Use AutoML to predict sales, footfall, conversion rate, and margins.",
80
+ backstory="A machine learning expert trained in forecasting business metrics using the best models.",
81
  llm=ChatOpenAI(model="gpt-4"),
82
  allow_delegation=True
83
  )
84
 
85
  chatbot_agent = Agent(
86
+ role="Conversational Data Assistant",
87
  goal="Answer business-related queries about the dataset.",
88
+ backstory="An AI-powered assistant trained to answer complex retail analytics questions based on data.",
89
  llm=ChatOpenAI(model="gpt-4"),
90
  allow_delegation=True
91
  )