Spaces:
Running
Running
Commit
•
b24fbb8
1
Parent(s):
0f6f12a
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,7 @@ from crewai import Agent, Task, Crew
|
|
6 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
7 |
from crewai_tools import FileReadTool, ScrapeWebsiteTool, MDXSearchTool, SerperDevTool
|
8 |
|
9 |
-
|
10 |
-
os.environ['OPENAI_API_KEY'] = 'dummy_key'
|
11 |
|
12 |
# Warning control
|
13 |
warnings.filterwarnings('ignore')
|
@@ -35,26 +34,28 @@ search_tool = SerperDevTool()
|
|
35 |
scrape_tool = ScrapeWebsiteTool()
|
36 |
read_resume = FileReadTool(file_path='./fake_resume.md')
|
37 |
|
38 |
-
#
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
),
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
),
|
53 |
),
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
# Define agents
|
60 |
researcher = Agent(
|
@@ -173,22 +174,14 @@ job_application_crew = Crew(
|
|
173 |
|
174 |
# Job Application Inputs
|
175 |
job_application_inputs = {
|
176 |
-
'job_posting_url': 'https://www.linkedin.com/jobs/search/?alertAction=viewjobs¤tJobId=3971168247&distance=25&f_TPR=a1720706267-&f_WT=1%2C3%2C2&geoId=105524837&keywords=data%20scientist&origin=JOB_ALERT_IN_APP_NOTIFICATION&originToLandingJobPostings=
|
177 |
-
'github_url': 'https://github.com/
|
178 |
-
'linkedin_url': 'https://www.linkedin.com/in/
|
179 |
-
'personal_writeup':
|
180 |
-
Prathamesh Khade is an accomplished Software Engineering Leader with experience in managing teams,
|
181 |
-
specializing in multiple programming languages and frameworks. He holds a strong background in AI and data science.
|
182 |
-
Prathamesh has successfully led major tech initiatives, proving his ability to drive innovation and growth in the tech industry.
|
183 |
-
Ideal for leadership roles that require a strategic and innovative approach."""
|
184 |
}
|
185 |
|
186 |
-
#
|
187 |
-
|
188 |
-
|
189 |
-
# Display results
|
190 |
-
st.markdown("# Tailored Resume")
|
191 |
-
st.markdown(open("tailored_resume.md").read())
|
192 |
|
193 |
-
|
194 |
-
st.
|
|
|
6 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
7 |
from crewai_tools import FileReadTool, ScrapeWebsiteTool, MDXSearchTool, SerperDevTool
|
8 |
|
9 |
+
|
|
|
10 |
|
11 |
# Warning control
|
12 |
warnings.filterwarnings('ignore')
|
|
|
34 |
scrape_tool = ScrapeWebsiteTool()
|
35 |
read_resume = FileReadTool(file_path='./fake_resume.md')
|
36 |
|
37 |
+
# Attempt to initialize MDXSearchTool
|
38 |
+
try:
|
39 |
+
emantic_search_resume = MDXSearchTool(
|
40 |
+
config=dict(
|
41 |
+
llm=dict(
|
42 |
+
provider="ollama",
|
43 |
+
config=dict(
|
44 |
+
model="llama2",
|
45 |
+
),
|
46 |
),
|
47 |
+
embedder=dict(
|
48 |
+
provider="google",
|
49 |
+
config=dict(
|
50 |
+
model="models/embedding-001",
|
51 |
+
task_type="retrieval_document",
|
52 |
+
),
|
53 |
),
|
54 |
),
|
55 |
+
mdx='./fake_resume.md'
|
56 |
+
)
|
57 |
+
except Exception as e:
|
58 |
+
st.error(f"Failed to initialize MDXSearchTool: {e}")
|
59 |
|
60 |
# Define agents
|
61 |
researcher = Agent(
|
|
|
174 |
|
175 |
# Job Application Inputs
|
176 |
job_application_inputs = {
|
177 |
+
'job_posting_url': 'https://www.linkedin.com/jobs/search/?alertAction=viewjobs¤tJobId=3971168247&distance=25&f_TPR=a1720706267-&f_WT=1%2C3%2C2&geoId=105524837&keywords=data%20scientist&origin=JOB_ALERT_IN_APP_NOTIFICATION&originToLandingJobPostings=3971101316%2C3971168247%2C3967271270&searchSessionId=8zvx%2B0XyTXGBHQHqUmPRDQ%3D%3D',
|
178 |
+
'github_url': 'https://github.com/PrathameshK',
|
179 |
+
'linkedin_url': 'https://www.linkedin.com/in/prathameshkhade/',
|
180 |
+
'personal_writeup': './fake_resume.md'
|
|
|
|
|
|
|
|
|
181 |
}
|
182 |
|
183 |
+
# Running Tasks
|
184 |
+
results = job_application_crew.run_tasks(inputs=job_application_inputs)
|
|
|
|
|
|
|
|
|
185 |
|
186 |
+
# Display Results
|
187 |
+
st.write(results)
|