eaglelandsonce commited on
Commit
a7b58fc
1 Parent(s): fb75dec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -5,7 +5,7 @@ import google.generativeai as genai
5
 
6
  # Tool import
7
  from crewai.tools.gemini_tools import GeminiSearchTools
8
- from crewai.tools.clarifai_tools import ClarifaiTools
9
 
10
  # Google Langchain
11
  from langchain_google_genai import GoogleGenerativeAI
@@ -58,7 +58,7 @@ def crewai_process(research_topic):
58
  allow_delegation=False,
59
  llm = gemini_llm,
60
  tools=[
61
- ClarifaiTools.clarifai_image
62
  ]
63
 
64
  # Add tools and other optional parameters as needed
@@ -143,14 +143,20 @@ def crewai_process(research_topic):
143
  agent=finalizer
144
  )
145
 
 
 
 
 
 
 
146
  # Instantiate your crew with a sequential process
147
  crew = Crew(
148
  # agents=[author, artist, poet, reader, finalizer ],
149
  # tasks=[task1, task2, task3, task4, task5]
150
  # agents=[author, artist, poet, finalizer ],
151
  # tasks=[task1, task2, task3, task5],
152
- agents=[author, artist],
153
- tasks=[task1, task2],
154
  verbose=2,
155
  process=Process.sequential
156
  )
@@ -173,6 +179,5 @@ if st.button("Run"):
173
  # Run the crewai process
174
  result = crewai_process(input_topic)
175
  # Display the result
176
- #st.text_area("Output", value=result, height=300)
177
 
178
- st.image(result, caption='Generated Image', use_column_width=True)
 
5
 
6
  # Tool import
7
  from crewai.tools.gemini_tools import GeminiSearchTools
8
+
9
 
10
  # Google Langchain
11
  from langchain_google_genai import GoogleGenerativeAI
 
58
  allow_delegation=False,
59
  llm = gemini_llm,
60
  tools=[
61
+ GeminiSearchTools.gemini_search
62
  ]
63
 
64
  # Add tools and other optional parameters as needed
 
143
  agent=finalizer
144
  )
145
 
146
+ task6 = Task(
147
+ description="""output both the story created by the author""",
148
+ agent=finalizer
149
+
150
+ )
151
+
152
  # Instantiate your crew with a sequential process
153
  crew = Crew(
154
  # agents=[author, artist, poet, reader, finalizer ],
155
  # tasks=[task1, task2, task3, task4, task5]
156
  # agents=[author, artist, poet, finalizer ],
157
  # tasks=[task1, task2, task3, task5],
158
+ agents=[author, finalizer],
159
+ tasks=[task1, task6],
160
  verbose=2,
161
  process=Process.sequential
162
  )
 
179
  # Run the crewai process
180
  result = crewai_process(input_topic)
181
  # Display the result
182
+ st.text_area("Output", value=result, height=300)
183