File size: 3,953 Bytes
8cc9c3b
 
361f46f
8cc9c3b
 
 
 
 
361f46f
 
 
 
 
8cc9c3b
 
8390adf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2292c22
8390adf
 
 
 
 
 
 
 
 
 
 
 
 
832a301
2292c22
 
 
8390adf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361f46f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
title: LeadGenAI
emoji: πŸ“Š
colorFrom: blue
colorTo: purple
sdk_version: 1.26.0
app_file: app.py
pinned: false
license: apache-2.0
sdk: streamlit
thumbnail: >-
  https://cdn-uploads.huggingface.co/production/uploads/66743e7056cf3c354860fabb/yZH3E8P6M0y3KJDlagO_p.png
short_description: LinkedIn Lead Generation and Business Optimization App
---

# LeadGenAI - LinkedIn Lead Generation and Business Optimization App

LeadGenAI is a Streamlit-based application that empowers users to generate leads from LinkedIn and optimize their business strategies using the power of IBM Watsonx AI.  This application offers two core functionalities: lead generation based on specific criteria and AI-powered business plan generation.

## Features

**Lead Generation:**

* **Targeted Search:** Filter LinkedIn profiles based on criteria like country, industry, and company.
* **Data Extraction:** Extract key information such as name, location, company, position, and about section.
* **Data Export:** Download leads as CSV and PDF files for easy access and sharing.
* **Session History:** Access and download previous lead generation sessions.

**Business Optimization:**

* **AI-Powered Business Plans:** Generate comprehensive business plans based on user-provided requirements.
* **Detailed Insights:** Receive detailed business plans including concept, target audience, revenue model, key differentiators, and potential challenges.
* **Lead Targeting:** Get specific lead suggestions with links to Twitter, LinkedIn, and company websites.
* **Session History:** Review and download past business plan generation sessions.

## Installation

1. **Clone the Repository:**
   ```bash
   git clone https://huggingface.co/spaces/mmfarabi/LeadGenAI
   ```

2. **Create a Virtual Environment (Recommended):**
   ```bash
   python3 -m venv .venv
   source .venv/bin/activate  # On Windows: .venv\Scripts\activate
   ```

3. **Install Dependencies:**
   ```bash
   pip install -r requirements.txt
   ```
   `requirements.txt` should contain the following:
   ```bash
   streamlit==1.26.0
   pandas==2.0.3
   fpdf==1.7.2
   ibm-watsonx-ai
   ```

4. **IBM Watsonx Credentials:**
   You will need an IBM Watsonx account and API key.  Store these credentials securely.  The app currently stores credentials directly in the `get_credentials()` function, but this should be updated to a more secure method such as environment variables or a secrets management tool.  Update the placeholder values in the `get_credentials()` function with your actual credentials:
   ```python
   def get_credentials():
       return {
           "url": "YOUR_WATSONX_URL",
           "apikey": "YOUR_WATSONX_API_KEY"
       }
   ```

5. **Data Files:**
   Ensure the `LinkedIn_profiles_info_modified.json` and `LinkedIn_company_info_modified.json` files are present in the same directory as the application.  These files contain the LinkedIn data. The format is expected to be JSON.  If the files do not start with `[`, the app will attempt to convert them to a valid JSON array.

## Usage

1. **Run the App:**
   ```bash
   streamlit run app.py
   ```

2. **Lead Generation:**
   - Enter your lead search criteria in the text area.
   - Select the desired number of leads.
   - Click "Generate Leads".

3. **Business Optimization:**
   - Enter your business idea requirements in the text area.
   - Click "Generate Idea & Leads".
   - Download the generated business plan as a PDF.

4. **Accessing Past Sessions:**
   Use the tabs to navigate to "Lead Sessions" or "Plan Sessions" to view and download data from previous runs.


## Technologies Used

* **Streamlit:** For building the interactive web application.
* **Pandas:** For data manipulation and analysis.
* **FPDF:** For generating PDF reports.
* **IBM Watsonx AI:** For generating business plans and ideas.
* **SQLite:** For storing session data.
* **JSON:** For data storage and exchange.

## License

Apache License Version 2.0