samihalawa commited on
Commit
a9556a5
·
1 Parent(s): 6d6792a

Sync changes - automated commit

Browse files
Files changed (6) hide show
  1. .DS_Store +0 -0
  2. .env.example +3 -0
  3. README.md +21 -1
  4. __pycache__/app.cpython-311.pyc +0 -0
  5. app.py +3 -3
  6. requirements.txt +5 -1
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
.env.example ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Hugging Face API token for accessing AI models
2
+ # Get your token from https://huggingface.co/settings/tokens
3
+ HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token_here
README.md CHANGED
@@ -29,10 +29,12 @@ This tool helps automate lead generation and email outreach by combining the pow
29
  ```
30
  HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token
31
  ```
 
32
 
33
  2. Install dependencies:
34
  ```
35
  pip install -r requirements.txt
 
36
  ```
37
 
38
  3. Run the application:
@@ -63,12 +65,30 @@ This tool helps automate lead generation and email outreach by combining the pow
63
 
64
  - gradio==5.4.0
65
  - langchain_community==0.3.5
 
 
66
  - python-dotenv==1.0.1
67
  - scrapegraphai==1.28.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
  ## Note
70
 
71
- This tool uses AI models from Hugging Face for scraping. You need to obtain an API token from Hugging Face and add it to your `.env` file for the application to work.
72
 
73
  ## Contributing
74
 
 
29
  ```
30
  HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token
31
  ```
32
+ (You can copy from the provided `.env.example` file and fill in your token)
33
 
34
  2. Install dependencies:
35
  ```
36
  pip install -r requirements.txt
37
+ playwright install
38
  ```
39
 
40
  3. Run the application:
 
65
 
66
  - gradio==5.4.0
67
  - langchain_community==0.3.5
68
+ - langchain_huggingface==0.0.2
69
+ - huggingface_hub>=0.19.0
70
  - python-dotenv==1.0.1
71
  - scrapegraphai==1.28.0
72
+ - playwright==1.40.0
73
+
74
+ ## HuggingFace API Token
75
+
76
+ This tool requires a HuggingFace API token to access the language models:
77
+
78
+ 1. Create a free account at [HuggingFace](https://huggingface.co/)
79
+ 2. Generate an API token from your account settings
80
+ 3. Add the token to your `.env` file:
81
+ ```
82
+ HUGGINGFACEHUB_API_TOKEN=your_huggingface_api_token
83
+ ```
84
+
85
+ The application uses the following models:
86
+ - Language model: Qwen/Qwen2.5-72B-Instruct
87
+ - Embeddings model: sentence-transformers/all-MiniLM-l6-v2
88
 
89
  ## Note
90
 
91
+ This tool uses AI models from Hugging Face for scraping and personalization. You need to obtain an API token from Hugging Face and add it to your `.env` file for the application to work.
92
 
93
  ## Contributing
94
 
__pycache__/app.cpython-311.pyc ADDED
Binary file (23.3 kB). View file
 
app.py CHANGED
@@ -15,7 +15,7 @@ import time
15
 
16
  # Ensure Playwright installs required browsers and dependencies
17
  subprocess.run(["playwright", "install"])
18
- #subprocess.run(["playwright", "install-deps"])
19
 
20
  # Load environment variables
21
  load_dotenv()
@@ -25,9 +25,9 @@ HUGGINGFACEHUB_API_TOKEN = os.getenv('HUGGINGFACEHUB_API_TOKEN')
25
  repo_id = "Qwen/Qwen2.5-72B-Instruct"
26
 
27
  llm_model_instance = HuggingFaceEndpoint(
28
- repo_id=repo_id,
29
  temperature=0.5,
30
- max_tokens=128,
31
  huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN
32
  )
33
 
 
15
 
16
  # Ensure Playwright installs required browsers and dependencies
17
  subprocess.run(["playwright", "install"])
18
+ subprocess.run(["playwright", "install-deps"])
19
 
20
  # Load environment variables
21
  load_dotenv()
 
25
  repo_id = "Qwen/Qwen2.5-72B-Instruct"
26
 
27
  llm_model_instance = HuggingFaceEndpoint(
28
+ repo_id=repo_id,
29
  temperature=0.5,
30
+ max_new_tokens=128,
31
  huggingfacehub_api_token=HUGGINGFACEHUB_API_TOKEN
32
  )
33
 
requirements.txt CHANGED
@@ -1,4 +1,8 @@
1
  gradio==5.4.0
2
  langchain_community==0.3.5
 
 
3
  python-dotenv==1.0.1
4
- scrapegraphai==1.28.0
 
 
 
1
  gradio==5.4.0
2
  langchain_community==0.3.5
3
+ langchain_huggingface==0.0.2
4
+ huggingface_hub>=0.19.0
5
  python-dotenv==1.0.1
6
+ scrapegraphai==1.28.0
7
+ playwright==1.40.0
8
+ python-dotenv==1.0.1