sync
Browse files
README.md
CHANGED
@@ -11,74 +11,96 @@ license: cc-by-nc-nd-4.0
|
|
11 |
---
|
12 |
# CrewAI Research Tool
|
13 |
|
14 |
-
Welcome to the CrewAI Research Tool on Hugging Face Spaces! This tool
|
15 |
|
16 |
-
## Description
|
17 |
|
18 |
-
The CrewAI Research Tool
|
|
|
|
|
|
|
19 |
|
20 |
-
## Features
|
21 |
|
22 |
-
- **Web Search Automation**:
|
23 |
-
-
|
24 |
-
- **
|
25 |
-
-
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
## Tools and Technologies
|
28 |
|
29 |
-
- **CrewAI**:
|
30 |
-
-
|
31 |
-
- **
|
|
|
|
|
|
|
32 |
|
33 |
-
## Utility Functions
|
34 |
-
• setup_logging(): Configures logging to output messages to the console.
|
35 |
-
• export_to_markdown(result): Saves the generated report to a Markdown file.
|
36 |
-
• fetch_content(url): Retrieves content from a given URL, handling both PDFs and standard web articles.
|
37 |
|
38 |
-
|
|
|
|
|
39 |
|
40 |
-
Custom
|
41 |
-
• search_results(search_query: str) -> list: Performs a web search using DuckDuckGo and returns a list of results.
|
42 |
-
• web_scrapper(url: str, topic: str) -> str: Extracts and summarizes content from a specified URL related to a given topic.
|
43 |
|
44 |
-
|
|
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
1. Researcher: Gathers detailed information on a specified topic using web search and scraping tools.
|
48 |
-
2. Editor: Compiles and refines the gathered information into a comprehensive report.
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
-
|
|
|
|
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
-
• Model Selection: Users can choose between different AI models (Azure, OpenAI, Groq-Cohere).
|
62 |
-
• API Key Inputs: Depending on the selected model, relevant API key fields are displayed for user input.
|
63 |
-
• Topic Input: Users enter the research topic they are interested in.
|
64 |
-
• Buttons: ‘Start Research’ initiates the process, and ‘Export to Markdown’ allows users to save the report.
|
65 |
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
|
76 |
-
|
77 |
|
78 |
-
|
|
|
|
|
79 |
|
80 |
-
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
---
|
12 |
# CrewAI Research Tool
|
13 |
|
14 |
+
Welcome to the **CrewAI Research Tool** on Hugging Face Spaces! This tool leverages **Gradio**, **Cohere**, **CrewAI**, and **Azure/OpenAI technologies** to automate and streamline online research, compile reports, and extract data through web crawling.
|
15 |
|
16 |
+
## 📝 Description
|
17 |
|
18 |
+
The CrewAI Research Tool uses advanced AI capabilities to:
|
19 |
+
- Gather, analyze, and compile information on various topics.
|
20 |
+
- Deliver comprehensive, structured reports.
|
21 |
+
- Automate the research process, from web searching to report generation.
|
22 |
|
23 |
+
## 🚀 Features
|
24 |
|
25 |
+
- **Web Search Automation**:
|
26 |
+
- Uses the DuckDuckGo search engine to perform searches and gather detailed results.
|
27 |
+
- **Data Extraction and Summarization**:
|
28 |
+
- Extracts and summarizes web content using web scraping tools and LLMs.
|
29 |
+
- **Detailed Report Generation**:
|
30 |
+
- Agents like 'Researcher' and 'Editor' sequentially craft polished reports based on findings.
|
31 |
+
- **Interactive Gradio Interface**:
|
32 |
+
- Allows users to input research topics and generate reports with a single button click.
|
33 |
|
34 |
+
## 🛠 Tools and Technologies
|
35 |
|
36 |
+
- **CrewAI**:
|
37 |
+
- Orchestrates agents with specific roles to automate workflows.
|
38 |
+
- **OpenAI, Azure OpenAI Services, and Groq**:
|
39 |
+
- Employs large language models for understanding and content generation.
|
40 |
+
- **Gradio**:
|
41 |
+
- Provides an intuitive web interface for user interaction.
|
42 |
|
43 |
+
## ⚙️ Utility Functions
|
|
|
|
|
|
|
44 |
|
45 |
+
- **`setup_logging()`**: Configures logging to output messages to the console.
|
46 |
+
- **`export_to_markdown(result)`**: Saves the generated report to a Markdown file.
|
47 |
+
- **`fetch_content(url)`**: Retrieves content from a URL, handling both PDFs and web articles.
|
48 |
|
49 |
+
### Custom Tools
|
|
|
|
|
50 |
|
51 |
+
- **`search_results(search_query: str) -> list`**:
|
52 |
+
- Performs a web search using DuckDuckGo and returns a list of results.
|
53 |
+
- **`web_scrapper(url: str, topic: str) -> str`**:
|
54 |
+
- Extracts and summarizes content from a URL related to a topic.
|
55 |
|
56 |
+
## 🤖 AI Agents and Tasks
|
|
|
|
|
57 |
|
58 |
+
### Agents
|
59 |
+
1. **Researcher**: Gathers detailed information on a specified topic using search and scraping tools.
|
60 |
+
2. **Editor**: Refines the collected data into a structured, polished report.
|
61 |
|
62 |
+
### Tasks
|
63 |
+
- **`research_task`**: Directs the Researcher to collect and draft information.
|
64 |
+
- **`edit_task`**: Guides the Editor to refine drafts into final reports.
|
65 |
|
66 |
+
## 🧠 Crew Orchestration
|
67 |
|
68 |
+
The **Crew** class manages agents and tasks, ensuring proper execution order and seamless interactions.
|
69 |
|
70 |
+
## 💻 How to Use
|
|
|
|
|
|
|
|
|
71 |
|
72 |
+
The user interface, built with **Gradio**, includes:
|
73 |
+
- **Model Selection**: Choose between AI models (Azure, OpenAI, Groq-Cohere).
|
74 |
+
- **API Key Inputs**: Provide necessary API keys for the selected model.
|
75 |
+
- **Topic Input**: Enter the research topic.
|
76 |
+
- **Buttons**:
|
77 |
+
- **Start Research**: Initiates the research process.
|
78 |
+
- **Export to Markdown**: Saves the report as a Markdown file.
|
79 |
|
80 |
+
### Steps
|
81 |
+
1. **Select a Model**: Use the radio buttons to choose your preferred AI model.
|
82 |
+
2. **Enter API Keys**: Fill in the required API keys based on the model.
|
83 |
+
3. **Enter a Topic**: Type your research topic into the textbox.
|
84 |
+
4. **Start Research**: Click the button to generate the report.
|
85 |
+
5. **View Results**: See the generated report in the output section.
|
86 |
+
6. **Export Report**: Save the report as a Markdown file for future reference.
|
87 |
|
88 |
+
## 🌟 Contributions and Feedback
|
89 |
|
90 |
+
We welcome contributions!
|
91 |
+
- Duplicate this Space, make improvements, and submit a pull request.
|
92 |
+
- For feedback and issues, open an issue in the project's Community tab.
|
93 |
|
94 |
+
## 📜 License
|
95 |
|
96 |
+
This project is licensed under the **cc-by-nc-nd-4.0**.
|
97 |
|
98 |
+
## 🙏 Acknowledgments
|
99 |
+
|
100 |
+
Special thanks to the open-source projects and APIs that made this tool possible:
|
101 |
+
- Gradio
|
102 |
+
- CrewAI
|
103 |
+
- OpenAI
|
104 |
+
- Azure OpenAI Services
|
105 |
+
- Cohere
|
106 |
+
- DuckDuckGo
|