dromerosm commited on
Commit
42ed23b
·
1 Parent(s): 9243126
Files changed (1) hide show
  1. README.md +70 -48
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 employs a combination of Gradio, Cohere, CrewAI, and Azure / OpenAI technologies to automate and streamline the process of online research, compiling reports, and extracting data through web crawling.
15
 
16
- ## Description
17
 
18
- The CrewAI Research Tool leverages advanced AI capabilities to gather, analyze, and compile information on a wide range of topics, delivering comprehensive and structured reports. It automates the entire research process from web searching to report generation.
 
 
 
19
 
20
- ## Features
21
 
22
- - **Web Search Automation**: Utilizes the DuckDuckGo search engine to perform web searches and gather detailed results related to specified topics.
23
- - **Data Extraction and Summarization**: Employs web scraping tools and LLMs to extract and summarize web content.
24
- - **Detailed Report Generation**: Automated agents, defined as 'Researcher' and 'Editor', work sequentially to craft detailed and polished reports based on web findings.
25
- - **Interactive Gradio Interface**: Users can input their research topic directly into the Gradio interface and initiate the research process with a simple button click.
 
 
 
 
26
 
27
- ## Tools and Technologies
28
 
29
- - **CrewAI**: Integrates agents with specific roles and tasks to automate complex workflows.
30
- - **OpenAI, Azure OpenAI Services and Groq**: Employs large language models for deep understanding and generation of content.
31
- - **Gradio**: Provides an interactive web interface to facilitate easy user interaction with the CrewAI system.
 
 
 
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
- ## Tools
 
 
39
 
40
- Custom tools are defined to extend the capabilities of the AI agents:
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
- ## AI Agents and Tasks
 
 
 
45
 
46
- The application defines two primary agents:
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
- Tasks are assigned to these agents to guide their actions:
51
- • research_task: Instructs the Researcher to collect and draft information on the topic.
52
- • edit_task: Instructs the Editor to refine the draft into a polished report.
53
 
54
- ## Crew Orchestration
 
 
55
 
56
- The Crew class coordinates the agents and tasks, managing their execution order and interactions.
57
 
58
- ## How to Use
59
 
60
- The user interface is built using Gradio, providing interactive elements for user input and displaying results.
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
- How to Use the Interface:
67
- 1. Select a Model: Choose the AI model you wish to use from the ‘Choose Model’ radio buttons.
68
- 2. Enter API Keys: Depending on the selected model, input the required API keys in the provided fields.
69
- 3. Enter a Topic: Type the research topic into the ‘Enter Topic’ textbox.
70
- 4. Start Research: Click the ‘Start Research’ button to initiate the automated research process.
71
- 5. View Results: The generated report will appear in the ‘Result’ section.
72
- 6. Export Report: To save the report, click the ‘Export to Markdown button and download the file.
73
 
74
- ## Contributions and Feedback
 
 
 
 
 
 
75
 
76
- Contributions to this project are welcome! Feel free to duplicate the Space, make improvements, and submit a pull request. For feedback and issues, please open an issue in the project's Community tab.
77
 
78
- ## License
 
 
79
 
80
- This project is licensed under the cc-by-nc-nd-4.0.
81
 
82
- ## Acknowledgments
83
 
84
- Special thanks to the open-source projects and APIs that made this tool possible: Gradio, CrewAI, LangChain, Cohere, and DuckDuckGo.
 
 
 
 
 
 
 
 
 
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