Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
3 |
|
4 |
-
st.title("
|
5 |
|
6 |
-
def
|
7 |
prompt = (
|
8 |
-
f"
|
9 |
-
"
|
10 |
)
|
11 |
|
12 |
llm = ChatGoogleGenerativeAI(model="gemini-pro", google_api_key=st.secrets["GOOGLE_API_KEY"])
|
@@ -16,15 +16,15 @@ def get_job_recommendations(software_skills):
|
|
16 |
return recommendations
|
17 |
|
18 |
with st.form("job_form"):
|
19 |
-
|
20 |
-
submitted = st.form_submit_button("Get
|
21 |
|
22 |
if submitted:
|
23 |
-
if
|
24 |
-
|
25 |
-
if
|
26 |
-
st.info(
|
27 |
else:
|
28 |
-
st.error("Failed to retrieve
|
29 |
else:
|
30 |
-
st.error("Please enter
|
|
|
1 |
import streamlit as st
|
2 |
from langchain_google_genai import ChatGoogleGenerativeAI
|
3 |
|
4 |
+
st.title("Job Role Skills Recommendation Bot")
|
5 |
|
6 |
+
def get_skills_recommendations(job_role):
|
7 |
prompt = (
|
8 |
+
f"For the job role of {job_role}, suggest the necessary software and skills that one should learn to excel in this role. "
|
9 |
+
"Provide a detailed list of recommendations."
|
10 |
)
|
11 |
|
12 |
llm = ChatGoogleGenerativeAI(model="gemini-pro", google_api_key=st.secrets["GOOGLE_API_KEY"])
|
|
|
16 |
return recommendations
|
17 |
|
18 |
with st.form("job_form"):
|
19 |
+
job_role = st.text_input("Enter the job role you want to apply for")
|
20 |
+
submitted = st.form_submit_button("Get Skills Recommendations")
|
21 |
|
22 |
if submitted:
|
23 |
+
if job_role:
|
24 |
+
skills_recommendations = get_skills_recommendations(job_role)
|
25 |
+
if skills_recommendations:
|
26 |
+
st.info(skills_recommendations)
|
27 |
else:
|
28 |
+
st.error("Failed to retrieve skills recommendations.")
|
29 |
else:
|
30 |
+
st.error("Please enter a job role to get skills recommendations.")
|