amartyasaran commited on
Commit
b2647bd
·
1 Parent(s): 97a5f0e

Readme Updated

Browse files
Files changed (2) hide show
  1. README.md +84 -1
  2. main.py +1 -1
README.md CHANGED
@@ -8,4 +8,87 @@ pinned: false
8
  license: mit
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  license: mit
9
  ---
10
 
11
+ # IntelliHire
12
+
13
+ **IntelliHire** is an intelligent candidate discovery tool that uses OpenAI's language models and Google Search via SerpAPI to find potential candidates (e.g., from LinkedIn) based on natural language queries. It indexes the results using FAISS and allows semantic querying through an API.
14
+
15
+ ## Features
16
+
17
+ * Converts natural language job search queries to structured Google search queries.
18
+ * Retrieves candidate snippets from Google using SerpAPI.
19
+ * Indexes results with FAISS for semantic search.
20
+ * Exposes a `/search` endpoint via FastAPI.
21
+
22
+ ## Requirements
23
+
24
+ * Python 3.9+
25
+ * Azure OpenAI credentials
26
+ * SerpAPI key
27
+ * `.env` file with required Azure credentials
28
+
29
+ ## Installation
30
+
31
+ ```bash
32
+ pip install -r requirements.txt
33
+ ```
34
+
35
+ ### Required `.env` variables
36
+
37
+ ```env
38
+ AZURE_API_KEY=your_azure_api_key
39
+ AZURE_VERSION=your_api_version
40
+ AZURE_OPENAI_ENDPOINT=https://your-endpoint.openai.azure.com/
41
+ ```
42
+
43
+ ## Usage
44
+
45
+ Start the API:
46
+
47
+ ```bash
48
+ uvicorn main:app --reload
49
+ ```
50
+
51
+ ### POST `/search`
52
+
53
+ Search for potential candidates using natural language.
54
+
55
+ **Request Body:**
56
+
57
+ ```json
58
+ {
59
+ "query": "Find React developer in Bangalore"
60
+ }
61
+ ```
62
+
63
+ **Response:**
64
+
65
+ ```json
66
+ {
67
+ "results": [
68
+ {
69
+ "metadata": {
70
+ "name": "John Doe",
71
+ "link": "https://linkedin.com/in/johndoe"
72
+ },
73
+ "text": "Experienced React developer based in Bangalore..."
74
+ },
75
+ ...
76
+ ]
77
+ }
78
+ ```
79
+
80
+ ## Tech Stack
81
+
82
+ * **FastAPI** – Web framework
83
+ * **Azure OpenAI** – LLM for query transformation
84
+ * **SerpAPI** – Google Search API
85
+ * **LlamaIndex + FAISS** – Vector indexing and retrieval
86
+
87
+ ## Notes
88
+
89
+ * Ensure your Azure deployment has a model named `agile4` or adjust the model name accordingly.
90
+ * This setup assumes semantic search over Google snippets rather than full LinkedIn profiles.
91
+
92
+ ## License
93
+
94
+ MIT
main.py CHANGED
@@ -80,7 +80,7 @@ def create_index(docs: list[Document]) -> VectorStoreIndex:
80
  return VectorStoreIndex.from_documents(
81
  docs,
82
  storage_context=storage_context,
83
- show_progress=False,
84
  )
85
 
86
  @app.post("/search")
 
80
  return VectorStoreIndex.from_documents(
81
  docs,
82
  storage_context=storage_context,
83
+ show_progress=True,
84
  )
85
 
86
  @app.post("/search")