eaglelandsonce commited on
Commit
7403211
1 Parent(s): 7a8be61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -22,14 +22,15 @@ def run_therapy_session(group_size, topic):
22
  allow_delegation=False
23
  )
24
  # Create participant agents
 
25
  participants = [Agent(
26
- role='Group Therapy Participant',
27
  goal='Participate in group therapy',
28
- backstory=f'{name} is interested in sharing and learning from the group.',
29
  verbose=True,
30
  allow_delegation=False)
31
  for name in participant_names[:group_size - 1]]
32
- participants.append(dr_smith) # Add the therapist
33
 
34
  # Define tasks for each participant
35
  tasks = [Task(description=f'{participant.role} discusses the topic: {topic}', agent=participant)
@@ -47,7 +48,7 @@ def run_therapy_session(group_size, topic):
47
  result = therapy_crew.kickoff()
48
 
49
  # Simulating a conversation (placeholder, adjust based on CrewAI capabilities)
50
- conversation = "\n".join([f"{name}: [Participant's thoughts on '{topic}']" for name in participant_names[:group_size-1] + ["Dr. Smith"]])
51
 
52
  return conversation
53
 
 
22
  allow_delegation=False
23
  )
24
  # Create participant agents
25
+
26
  participants = [Agent(
27
+ role=f'Group Therapy Participant - {name}',
28
  goal='Participate in group therapy',
29
+ backstory=f'{name} is interested in sharing and learning from the group.',
30
  verbose=True,
31
  allow_delegation=False)
32
  for name in participant_names[:group_size - 1]]
33
+ participants.append(dr_smith)
34
 
35
  # Define tasks for each participant
36
  tasks = [Task(description=f'{participant.role} discusses the topic: {topic}', agent=participant)
 
48
  result = therapy_crew.kickoff()
49
 
50
  # Simulating a conversation (placeholder, adjust based on CrewAI capabilities)
51
+ conversation = "\n".join([f"{participant.role.split(' - ')[-1]}: [Participant's thoughts on '{topic}']" for participant in participants])
52
 
53
  return conversation
54