streamlit working code1

This commit is contained in:
Madhu 2025-01-16 19:14:02 +05:30
parent 43ca191825
commit 07d62f26ee
3 changed files with 43 additions and 10 deletions

View file

@ -1,8 +1,35 @@
Search for URLs:
The script searches for relevant Quora URLs using Firecrawl's search endpoint.
Extract User Info:
The script extracts user information from the URLs using Firecrawl's LLM extract functionality.
Format User Info:
The script formats the extracted user information into a structured and readable format.
Write to Google Sheets:
The script creates a new Google Sheet and writes the formatted user information into it.
## 🎯 AI Lead Generation Agent
The AI Lead Generation Agent is a firecrawl powered agent that automates the process of finding and qualifying potential leads from Quora. It leverages Firecrawl's search and LLM extraction capabilities to identify relevant user profiles, extract valuable information, and organize it into a structured format in Google Sheets. This agent helps sales and marketing teams efficiently build targeted lead lists while saving hours of manual research.
### Features
- **Targeted Search**: Uses Firecrawl's search endpoint to find relevant Quora URLs based on your search criteria
- **Intelligent Extraction**: Leverages Firecrawl's LLM extract functionality to pull user information from Quora profiles
- **Automated Processing**: Formats extracted user information into a clean, structured format
- **Google Sheets Integration**: Automatically creates and populates Google Sheets with lead information
- **Customizable Criteria**: Allows you to define specific search parameters to find your ideal leads for your niche
### How to Get Started
1. **Clone the repository**:
```bash
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd ai_agent_tutorials/ai_lead_generation_agent
```
3. **Install the required packages**:
```bash
pip install -r requirements.txt
```
4. **Important thing to do in composio**:
- in the terminal, run this command: `composio add googlesheets`
- In your compposio dashboard, create a new google sheet intergation and make sure it is active in the active integrations/connections tab
5. **Set up your API keys**:
- Get your Firecrawl API key from [Firecrawl's website](https://www.firecrawl.dev/app/api-keys)
- Get your Composio API key from [Composio's website](https://composio.ai)
- Get your OpenAI API key from [OpenAI's website](https://platform.openai.com/api-keys)
6. **Run the application**:
```bash
streamlit run ai_lead_generation_agent.py
```

View file

@ -149,7 +149,7 @@ def write_to_google_sheets(flattened_data, composio_api_key, openai_api_key):
# Streamlit UI
def main():
st.title("AI Lead Generation Agent")
st.info("This app helps you generate leads from Quora by searching for relevant posts and extracting user information.")
st.info("This firecrawl powered agent helps you generate leads from Quora by searching for relevant posts and extracting user information.")
# Sidebar for API keys
with st.sidebar:
@ -159,7 +159,7 @@ def main():
composio_api_key = st.text_input("Composio API Key", type="password")
# Main input for company description
company_description = st.text_input("Enter the company description or niche to find leads in:")
company_description = st.text_input("Enter your company description or the niche you want to find leads in:", placeholder="e.g. AI voice cloning, Video Generation AI tools")
if st.button("Generate Leads"):
if not all([firecrawl_api_key, openai_api_key, composio_api_key, company_description]):

View file

@ -0,0 +1,6 @@
firecrawl-py==1.9.0
phidata==2.7.3
composio-phidata==0.6.15
composio==0.1.1
pydantic==2.10.5
streamlit