Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Commit 
							
							·
						
						3517f30
	
1
								Parent(s):
							
							7403211
								
Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -33,8 +33,8 @@ def run_therapy_session(group_size, topic): 
     | 
|
| 33 | 
         
             
                participants.append(dr_smith)
         
     | 
| 34 | 
         | 
| 35 | 
         
             
                # Define tasks for each participant
         
     | 
| 36 | 
         
            -
                tasks = [Task(description=f'{participant.role}  
     | 
| 37 | 
         
            -
             
     | 
| 38 | 
         | 
| 39 | 
         
             
                # Instantiate the crew with a sequential process
         
     | 
| 40 | 
         
             
                therapy_crew = Crew(
         
     | 
| 
         @@ -50,7 +50,6 @@ def run_therapy_session(group_size, topic): 
     | 
|
| 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 | 
         | 
| 55 | 
         
             
            # Gradio interface
         
     | 
| 56 | 
         
             
            iface = gr.Interface(
         
     | 
| 
         | 
|
| 33 | 
         
             
                participants.append(dr_smith)
         
     | 
| 34 | 
         | 
| 35 | 
         
             
                # Define tasks for each participant
         
     | 
| 36 | 
         
            +
                tasks = [Task(description=f'{participant.role.split(" - ")[-1]}, please share your thoughts on the topic: "{topic}".', agent=participant)
         
     | 
| 37 | 
         
            +
                     for participant in participants]
         
     | 
| 38 | 
         | 
| 39 | 
         
             
                # Instantiate the crew with a sequential process
         
     | 
| 40 | 
         
             
                therapy_crew = Crew(
         
     | 
| 
         | 
|
| 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 | 
         | 
| 54 | 
         
             
            # Gradio interface
         
     | 
| 55 | 
         
             
            iface = gr.Interface(
         
     |