faizee07 commited on
Commit
e656d60
·
verified ·
1 Parent(s): 7bdd664

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -1,9 +1,8 @@
1
  import os
2
  import gradio as gr
3
  from crewai import Agent, Task, Crew, Process
4
- # CORRECTED IMPORTS FOR THE STABLE VERSIONS
5
- from crewai_tools.tools.search_tools import DuckDuckGoSearchTool
6
- from crewai_tools.tools.file_tools import FileWriteTool
7
  # ---
8
  from langchain_google_genai import ChatGoogleGenerativeAI
9
 
@@ -21,9 +20,9 @@ except Exception as e:
21
  llm = None
22
 
23
  # --- 2. DEFINE TOOLS AND OUTPUT DIRECTORY ---
24
- search_tool = DuckDuckGoSearchTool()
25
  os.makedirs("outputs", exist_ok=True)
26
- file_write_tool = FileWriteTool(file_path="outputs/index.html")
27
 
28
  # --- 3. DEFINE THE AGENT TEAM ---
29
  designer = Agent(
@@ -142,4 +141,4 @@ iface = gr.Interface(
142
  )
143
 
144
  if __name__ == "__main__":
145
- iface.launch()
 
1
  import os
2
  import gradio as gr
3
  from crewai import Agent, Task, Crew, Process
4
+ # CORRECTED IMPORTS FOR NEWER VERSIONS
5
+ from crewai_tools import DuckDuckGoSearchRun, FileWriterTool
 
6
  # ---
7
  from langchain_google_genai import ChatGoogleGenerativeAI
8
 
 
20
  llm = None
21
 
22
  # --- 2. DEFINE TOOLS AND OUTPUT DIRECTORY ---
23
+ search_tool = DuckDuckGoSearchRun()
24
  os.makedirs("outputs", exist_ok=True)
25
+ file_write_tool = FileWriterTool(file_path="outputs/index.html")
26
 
27
  # --- 3. DEFINE THE AGENT TEAM ---
28
  designer = Agent(
 
141
  )
142
 
143
  if __name__ == "__main__":
144
+ iface.launch()