ombhojane commited on
Commit
c1cb3d9
·
verified ·
1 Parent(s): db2f02d

Upload 30 files

Browse files
.env ADDED
@@ -0,0 +1 @@
 
 
1
+ GEMINI_API_KEY=AIzaSyCA4__JMC_ZIQ9xQegIj5LOMLhSSrn3pMw
README.md CHANGED
@@ -1,8 +1,8 @@
1
  ---
2
- title: Restartnext
3
- emoji: 💻
4
  colorFrom: blue
5
- colorTo: green
6
  sdk: streamlit
7
  sdk_version: 1.31.1
8
  app_file: app.py
 
1
  ---
2
+ title: Restartv5
3
+ emoji:
4
  colorFrom: blue
5
+ colorTo: yellow
6
  sdk: streamlit
7
  sdk_version: 1.31.1
8
  app_file: app.py
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import values
3
+ import strengths
4
+ import skills
5
+ import career
6
+ import linkedIn
7
+ import resume
8
+ import basic
9
+ import display_responses
10
+ import strengthpage2
11
+ import preference
12
+ import dreamjob
13
+
14
+ PAGES = {
15
+ "Information": basic,
16
+ "Values": values,
17
+ "Strengths": strengths,
18
+ "Strengths 2": strengthpage2,
19
+ "Skills": skills,
20
+ "Dream Job": dreamjob,
21
+ "Preferences": preference,
22
+ "Career Priorities": career,
23
+ "Display Responses": display_responses,
24
+ "LinkedIn": linkedIn,
25
+ "Resume": resume
26
+ }
27
+
28
+ st.sidebar.title('Main Menu')
29
+ selection = st.sidebar.radio("Go to", list(PAGES.keys()))
30
+
31
+ page = PAGES[selection]
32
+ page.app()
basic.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def save_data(data, filename='data.json'):
5
+ with open(filename, 'w') as f:
6
+ json.dump(data, f, indent=4)
7
+
8
+ def app():
9
+ st.title('Basic Information Form')
10
+
11
+ with st.form("basic_info_form", clear_on_submit=False):
12
+ name = st.text_input("Name")
13
+ mobile_no = st.text_input("Mobile No")
14
+ email_id = st.text_input("Email ID")
15
+ linkedin = st.text_input("LinkedIn (optional)")
16
+ github = st.text_input("GitHub (optional)")
17
+ submit_button = st.form_submit_button(label='Submit')
18
+
19
+ if submit_button:
20
+ data = {
21
+ "name": name,
22
+ "mobile": mobile_no,
23
+ "email": email_id,
24
+ "linkedin": linkedin,
25
+ "github": github
26
+ }
27
+ save_data(data)
28
+ st.success("Thank you for submitting your information.")
29
+
30
+ if __name__ == "__main__":
31
+ app()
career.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def app():
5
+ st.header("Career Priorities")
6
+ st.write("Rate the following aspects of your career according to your priority, and provide reasons for your choices.")
7
+
8
+ career_priorities = [
9
+ "Money",
10
+ "Benefits",
11
+ "Creative control",
12
+ "Flexible work options",
13
+ "Proximity to home/school/daycare",
14
+ "Challenge",
15
+ "Social connections and camaraderie",
16
+ "Measurable success",
17
+ ]
18
+
19
+ if 'priorities_data' not in st.session_state:
20
+ st.session_state.priorities_data = {aspect: {"rating": None, "reason": ""} for aspect in career_priorities}
21
+
22
+ for aspect in career_priorities:
23
+ with st.expander(f"Rate and Explain: {aspect}"):
24
+ current_rating = st.session_state.priorities_data[aspect]["rating"]
25
+ current_reason = st.session_state.priorities_data[aspect]["reason"]
26
+
27
+ st.session_state.priorities_data[aspect]["rating"] = st.slider(
28
+ "Priority Rating", min_value=1, max_value=8, value=current_rating if current_rating else 1, key=f"slider_{aspect}"
29
+ )
30
+ st.session_state.priorities_data[aspect]["reason"] = st.text_area(
31
+ "Why is this important to you?", value=current_reason, key=f"text_{aspect}"
32
+ )
33
+
34
+ if st.button('Save Answers'):
35
+ save_priorities_data(st.session_state.priorities_data)
36
+ st.success('Career Priorities saved successfully!')
37
+
38
+ def save_priorities_data(data):
39
+ """Save the priorities data to a JSON file."""
40
+ with open('career_priorities_data.json', 'w') as file:
41
+ json.dump(data, file, indent=4)
42
+
43
+ if __name__ == "__main__":
44
+ app()
career_priorities_data.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Money": {
3
+ "rating": 3,
4
+ "reason": "I want salary should be as per my experience tenure, i don\u2019t want to get the fresher salary. It should be the decent\n"
5
+ },
6
+ "Benefits": {
7
+ "rating": 6,
8
+ "reason": " I would like to take other benefits like mandatory leaves, childcare benefits, Brand Exposure, trips.\n"
9
+ },
10
+ "Creative control": {
11
+ "rating": 7,
12
+ "reason": " I left my previous job as leadership role so i prefer if i get the same position"
13
+ },
14
+ "Flexible work options": {
15
+ "rating": 1,
16
+ "reason": "As my kid is small so i prefer flexible work timing or work from home option.\n"
17
+ },
18
+ "Proximity to home/school/daycare": {
19
+ "rating": 7,
20
+ "reason": " I prefer that work place near to my home or day care so that in case of urgency i can reach out to my kid\n\n"
21
+ },
22
+ "Challenge": {
23
+ "rating": 3,
24
+ "reason": "I want to work where i can upskill myself by doing additional courses or certificate which help me in shaping my career\n"
25
+ },
26
+ "Social connections and camaraderie": {
27
+ "rating": 8,
28
+ "reason": "his is my last priority as i right now i just want to enter in workforce , do not want any target driven task\n\n"
29
+ },
30
+ "Measurable success": {
31
+ "rating": 5,
32
+ "reason": "I want there should be fair rewards and recognition for the profile like promotion, increment\n"
33
+ }
34
+ }
core_values_responses.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"What annoys you or gets under your skin at work?": "Insubordination by employee- It happened many times when we are working on project as team and one employee was continuously showing insubordination by not listening or by not following instruction of me or my supervisor which influenced other team member also for work. It irriated me very much as it was hampering my productivity plan and also it was giving negative energy to my team. When employer said No to leave- If any planned leaves are there and the employee already informed about it and it should be respectable because employee already gave time to employer for arranging backup by informing them.Then also if employer said No it becomes very irritable as ultimately it is creating dissatisfaction among employees because any way employer will go for leave. In my case also when my planned leaves were approved by my senior i enjoyed my leave and when i came back from leave i came with energy and with positive approach. ", "What brings you joy in your work?": "What brings you joy in your work? _When there is good work life balance-It happened with me when my Boss used to say work on every Saturday which was very irritating for me because Saturday was holiday for us but we had to work forcefully which was affecting my personal life and also that Boss used to say work on Sunday also sometimes which was creating fear as i was living with fear on every weekend. When there is respect-_i was in leadership role in HDFC Bank where many times it happened that no authority was given to me to take decisions but it also happened many times that i was given the power to take decisions and work independently.__When the respect was given to me any my role i was able to performed much better", "What could you not live without in a workplace or on a work team?": "I feel Focus towards work and freedom is very important for me. If my team is not focus and not aligned as per the objective we will not be able to achieve the target. In my team also whien i took the leadership the team was new, no focus and very much instability, i sit with them individually and helped them to plan their day and also align them for our goal. It was challenging in initial days but later on my team set their focus for achieving their target. Freedom is also very important i can not work where we can not express our opinions freely. In my case my Boss did not allow me to work as per my own way. I found very difficult to work . I had to take permission in every single decision which was somewhere making me low confidence and negative. I also manytimes took my opinion from my team member and applied in my work and it worked.", "Who do you admire and what do you admire about them?": "I admired__Mr Pankaj Agrawalwho is my ex supervisor because i feel him very inspiring. I got to learn many things under his leadership and he gave time to time guidance for making me productive every day. He also gave me authority for driving my team in my own way and later when i succeed and achieved my target, he acknowledged it by giving me good "}
data.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Om",
3
+ "mobile": "9090909090",
4
+ "email": "abc@gmail.com",
5
+ "linkedin": "https://www.linkedin.com/in/om",
6
+ "github": "https://github.com/om"
7
+ }
data.py ADDED
@@ -0,0 +1 @@
 
 
1
+ core_values_responses = {'What annoys you or gets under your skin at work?': 'Lack of clear communication.', 'What brings you joy in your work?': 'Completing projects successfully.', 'What could you not live without in a workplace or on a work team?': 'A supportive team environment.', 'Who do you admire and what do you admire about them?': 'Elon Musk, for his visionary approach.'}
display_responses.py ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def load_json_data(file_path):
5
+ """Utility function to load JSON data from a specified file path."""
6
+ try:
7
+ with open(file_path, 'r') as file:
8
+ return json.load(file)
9
+ except FileNotFoundError:
10
+ st.error(f"File {file_path} not found. Please ensure data has been saved.")
11
+ return None
12
+
13
+ def display_core_values():
14
+ """Displays the user's core values."""
15
+ core_values = load_json_data('core_values_responses.json')
16
+ if core_values:
17
+ st.header("Your Core Values")
18
+ for question, answer in core_values.items():
19
+ st.text(f"{question}: {answer}")
20
+
21
+ def display_strength_responses():
22
+ """Displays the user's responses to the strength exercises."""
23
+ strength_responses = load_json_data('strength_responses.json')
24
+ if strength_responses:
25
+ st.header("Your Strength Responses")
26
+ for key, value in strength_responses.items():
27
+ st.text(f"{key}: {value}")
28
+
29
+ def display_dynamic_strength_responses():
30
+ """Displays dynamic strength responses (Exercise 3) from the network."""
31
+ network_feedback_list = load_json_data('dynamic_strength_responses.json')
32
+ if network_feedback_list:
33
+ st.header("Dynamic Strength Responses (Exercise 3)")
34
+ for feedback in network_feedback_list:
35
+ st.subheader(f"Feedback from {feedback['name']} ({feedback['role']})")
36
+ for question, response in feedback['responses'].items():
37
+ st.markdown(f"- **{question}:** {response}")
38
+
39
+
40
+ def display_skills_and_experience():
41
+ """Displays the user's skills and experience responses."""
42
+ skills_and_experience_sets = load_json_data('skills_and_experience_sets.json')
43
+ if skills_and_experience_sets:
44
+ st.header("Your Skills and Experience")
45
+ for i, skills_set in enumerate(skills_and_experience_sets, start=1):
46
+ st.subheader(f"Skills and Experience Set {i}")
47
+ for question, answer in skills_set.items():
48
+ st.markdown(f"**{question}:** {answer}")
49
+
50
+ def display_preferences():
51
+ """Displays the user's career preferences."""
52
+ preferences_sets = load_json_data('preferences_sets.json')
53
+ if preferences_sets:
54
+ st.header("Your Career Preferences")
55
+ for i, preferences_set in enumerate(preferences_sets, start=1):
56
+ st.subheader(f"Preferences Set {i}")
57
+ for preference, answer in preferences_set.items():
58
+ st.markdown(f"**{preference}:** {answer}")
59
+
60
+ def display_dream_job_info():
61
+ """Displays the saved dream job information."""
62
+ try:
63
+ with open('dream_job_info.json', 'r') as file:
64
+ dream_job_info = json.load(file)
65
+
66
+ st.header("Your Dream Job Information")
67
+ st.markdown(f"**Dream Job Description:** {dream_job_info['dream_job_description']}")
68
+ st.markdown(f"**Is it a realistic possibility?** {dream_job_info['dream_job_realism']}")
69
+ if dream_job_info['dream_job_realism'] == "Yes":
70
+ st.markdown(f"**Explanation:** {dream_job_info['dream_job_explanation']}")
71
+ st.markdown(f"**Attributes:** {dream_job_info['dream_job_attributes']}")
72
+ st.markdown(f"**Feelings:** {dream_job_info['feel_sentence']}")
73
+ st.markdown(f"**Needs:** {dream_job_info['need_sentence']}")
74
+ st.markdown(f"**Goals:** {dream_job_info['goal_sentence']}")
75
+ except FileNotFoundError:
76
+ st.error("Dream Job Information not found.")
77
+
78
+ def display_priorities():
79
+ """Display saved career priorities."""
80
+ try:
81
+ with open('career_priorities_data.json', 'r') as file:
82
+ priorities_data = json.load(file)
83
+
84
+ st.header("Your Career Priorities")
85
+ for aspect, data in priorities_data.items():
86
+ st.subheader(aspect)
87
+ st.markdown(f"**Priority Rating:** {data['rating']}")
88
+ st.markdown(f"**Reason:** {data['reason']}")
89
+ except FileNotFoundError:
90
+ st.error("Career Priorities data not found.")
91
+
92
+ # Ensure the app() function calls display_dream_job_info()
93
+
94
+
95
+ # Ensure the app() function calls display_preferences()
96
+
97
+
98
+ # Ensure the app() function calls display_skills_and_experience()
99
+
100
+
101
+
102
+ def app():
103
+ display_core_values()
104
+ display_strength_responses()
105
+ display_dynamic_strength_responses()
106
+ display_skills_and_experience()
107
+ display_preferences()
108
+ display_dream_job_info()
109
+ display_priorities()
110
+
111
+ if __name__ == "__main__":
112
+ app()
dream_job_info.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dream_job_description": "As i always worked on retail segment, i always wanted to work in corporate sector and also big 4 MNC companies like Deloite, KPMG, E AND Y, PWC",
3
+ "dream_job_realism": "Yes",
4
+ "dream_job_explanation": " If I shift my career banking to cooperations to moving as Buisness analyst or consultant\n",
5
+ "dream_job_attributes": "Work Life Balance Brand Exposure Culture for female employees 5 day working Flexibility Salary\n\nchild care benefit\nforeign trip\nTravel allowance 10. learning and development\n",
6
+ "feel_sentence": "more statisfaction and more valuable in myself",
7
+ "need_sentence": "my need of flexible working along with work from home will complete",
8
+ "goal_sentence": "Brand exposure which will help me out with my career and good salary packages with Desination"
9
+ }
dreamjob.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def app():
5
+ st.header("Dream Job Exploration")
6
+
7
+ # Dream job description
8
+ dream_job_description = st.text_area("If there were no restrictions (for example, education, location, experience, or financial obligations), my dream job would be:", key="dream_job_description")
9
+
10
+ # Dream job realism
11
+ dream_job_realism = st.radio("Is obtaining this dream job a realistic possibility for me?", ("Yes", "No"), key="dream_job_realism")
12
+
13
+ # Explanation based on realism
14
+ if dream_job_realism == "Yes":
15
+ dream_job_explanation = st.text_area("If yes, explain how.", key="dream_job_explanation")
16
+ else:
17
+ dream_job_explanation = "" # Clear or ignore the explanation if not realistic
18
+
19
+ # Attributes of the dream job
20
+ dream_job_attributes = st.text_area("List at least ten specific attributes of this dream job (for example, content, culture, mission, responsibilities, or perks), as you imagine it, that appeal to you:", key="dream_job_attributes")
21
+
22
+ # Sentences about the dream job
23
+ feel_sentence = st.text_input("Working in this dream job would make me feel", key="feel_sentence")
24
+ need_sentence = st.text_input("Working this dream job would fill my need(s) for", key="need_sentence")
25
+ goal_sentence = st.text_input("Working in this dream job would meet my goal(s) of", key="goal_sentence")
26
+
27
+ if st.button('Save Dream Job Information'):
28
+ save_dream_job_info({
29
+ "dream_job_description": dream_job_description,
30
+ "dream_job_realism": dream_job_realism,
31
+ "dream_job_explanation": dream_job_explanation,
32
+ "dream_job_attributes": dream_job_attributes,
33
+ "feel_sentence": feel_sentence,
34
+ "need_sentence": need_sentence,
35
+ "goal_sentence": goal_sentence
36
+ })
37
+ st.success('Dream Job Information saved successfully!')
38
+
39
+ def save_dream_job_info(info):
40
+ """Save the dream job information to a JSON file."""
41
+ with open('dream_job_info.json', 'w') as file:
42
+ json.dump(info, file, indent=4)
43
+
44
+ if __name__ == "__main__":
45
+ app()
dynamic_strength_responses.json ADDED
@@ -0,0 +1 @@
 
 
1
+ [{"name": "sahil", "role": "ai lead", "responses": {"What tasks am I best at?": "Good in planning and Coordination\n", "How would you describe me to others?": " If astha takes responsibility she will ensure to deliver it. Dedicated for work given\n", "What are not my strengths?": " Lack of focus on self care \u2013 Astha does not care for herself in terms of eating and exercising. She gives priority to other things . She does not fruits much and not give time to herself for doing any kind of exercise instead of having time. She used to sit for long hours also to complete work.\n\n", "Preferred roles in projects?": "NA"}}]
gemini_responses.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "comprehensive_analysis": "Error calling Gemini API: The `response.text` quick accessor only works for simple (single-`Part`) text responses. This response is not simple text.Use the `result.parts` accessor or the full `result.candidates[index].content.parts` lookup instead."
3
+ }
linkedIn.py ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+ import json
4
+
5
+ import google.generativeai as genai
6
+
7
+ API_KEY = "AIzaSyCA4__JMC_ZIQ9xQegIj5LOMLhSSrn3pMw"
8
+
9
+ def configure_genai_api():
10
+
11
+ genai.configure(api_key=API_KEY)
12
+ generation_config = {
13
+ "temperature": 0.9,
14
+ "top_p": 1,
15
+ "top_k": 40,
16
+ "max_output_tokens": 2048,
17
+ }
18
+ safety_settings = [
19
+ {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
20
+ {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
21
+ {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
22
+ {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
23
+ ]
24
+ return genai.GenerativeModel(model_name="gemini-1.0-pro",
25
+ generation_config=generation_config,
26
+ safety_settings=safety_settings)
27
+
28
+ def load_user_data():
29
+ try:
30
+ with open('gemini_responses.json', 'r') as file:
31
+ return json.load(file)
32
+ except FileNotFoundError:
33
+ st.error("User data file not found. Please ensure 'gemini_responses.json' exists.")
34
+ return {}
35
+
36
+ def load_data():
37
+ try:
38
+ with open('data.json', 'r') as file:
39
+ return json.load(file)
40
+ except FileNotFoundError:
41
+ st.error("Data file not found. Please ensure 'data.json' exists.")
42
+ return {}
43
+
44
+ def combine_responses(user_data, data, *args):
45
+ combined_responses = []
46
+ for key, value in user_data.items():
47
+ combined_responses.append(f"{key}: {value}")
48
+ combined_responses.append(f"Name: {data['name']}")
49
+ combined_responses.append(f"Email: {data['email']}")
50
+ for response_set in args:
51
+ if isinstance(response_set, dict):
52
+ combined_responses.extend(response_set.values())
53
+ elif isinstance(response_set, list):
54
+ combined_responses.extend(response_set)
55
+ combined_responses.extend(data.values()) # Add data.json values
56
+ return " ".join(combined_responses)
57
+
58
+
59
+ def app():
60
+ st.header("LinkedIn Profile Creator")
61
+ model = configure_genai_api()
62
+ if not model:
63
+ return
64
+
65
+ # Load user data
66
+ user_data = load_user_data()
67
+ data = load_data() # Add this line to load the missing 'data' argument
68
+
69
+ combined_responses_text = combine_responses(user_data, data) # Pass the 'data' argument
70
+
71
+ prompt_template = f"""
72
+ Based on the following inputs, generate a professional bio and a short header bio that could be used on LinkedIn.
73
+ {combined_responses_text}
74
+ Provide optimized content for a LinkedIn Bio, Header Bio, Experience, Skills, Certifications. (dont give education section)
75
+ """
76
+
77
+ try:
78
+ response = model.generate_content([prompt_template])
79
+ st.subheader("Optimized LinkedIn Content")
80
+ st.write("Based on your input, here's optimized content for your LinkedIn profile:")
81
+ st.write(response.text)
82
+ except Exception as e:
83
+ st.error("An error occurred while generating your LinkedIn content. Please try again later.")
84
+ st.error(f"Error: {e}")
85
+
86
+ if __name__ == "__main__":
87
+ app()
linkedInv2.py ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import google.generativeai as genai
3
+ import os
4
+
5
+ def configure_genai_api():
6
+ api_key = os.getenv("GENAI_API_KEY")
7
+ if api_key is None:
8
+ st.error("API key not found. Please set the GENAI_API_KEY environment variable.")
9
+ return None
10
+ else:
11
+ genai.configure(api_key=api_key)
12
+ generation_config = {
13
+ "temperature": 0.9,
14
+ "top_p": 1,
15
+ "top_k": 40,
16
+ "max_output_tokens": 2048,
17
+ }
18
+ safety_settings = [
19
+ {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
20
+ {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
21
+ {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
22
+ {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
23
+ ]
24
+ return genai.GenerativeModel(model_name="gemini-1.0-pro",
25
+ generation_config=generation_config,
26
+ safety_settings=safety_settings)
27
+
28
+ def app():
29
+ st.header("LinkedIn Profile Creator")
30
+ model = configure_genai_api()
31
+ if not model:
32
+ return
33
+
34
+ # User input sections for experience
35
+ experiences = []
36
+ with st.form("experience_form"):
37
+ num_experiences = st.number_input("How many experiences do you want to add?", min_value=1, value=1, step=1)
38
+ for i in range(int(num_experiences)):
39
+ exp = {
40
+ "Title": st.text_input(f"Title {i+1}", placeholder="Ex: Retail Sales Manager"),
41
+ "Employment Type": st.selectbox(f"Employment Type {i+1}", ["Please select", "Full-time", "Part-time", "Self-employed", "Freelance", "Contract", "Internship"], index=0),
42
+ "Company Name": st.text_input(f"Company Name {i+1}", placeholder="Ex: Microsoft"),
43
+ "Location": st.text_input(f"Location {i+1}", placeholder="Ex: London, United Kingdom"),
44
+ "Location Type": st.selectbox(f"Location Type {i+1}", ["Please select", "On-site", "Remote", "Hybrid"], index=0),
45
+ "Is Current": st.checkbox(f"I am currently working in this role {i+1}"),
46
+ "Start Date": st.date_input(f"Start Date {i+1}"),
47
+ "End Date": st.date_input(f"End Date {i+1}") if not st.checkbox(f"End current position as of now {i+1}", value=True) else "Present",
48
+ "Industry": st.text_input(f"Industry {i+1}", placeholder="Ex: Software Development"),
49
+ "Description": st.text_area(f"Description {i+1}", placeholder="Describe your role, responsibilities, achievements...", max_chars=2000),
50
+ "Skills": st.text_input(f"Skills {i+1}", placeholder="Add skills separated by commas"),
51
+ }
52
+ experiences.append(exp)
53
+ submitted = st.form_submit_button("Submit")
54
+
55
+ if submitted and experiences:
56
+ # Generate the prompt for each experience and combine them
57
+ experience_prompts = []
58
+ for exp in experiences:
59
+ experience_prompt = f"""
60
+ Title: {exp['Title']}
61
+ Employment Type: {exp['Employment Type']}
62
+ Company Name: {exp['Company Name']}
63
+ Location: {exp['Location']}
64
+ Location Type: {exp['Location Type']}
65
+ Start Date: {exp['Start Date']}
66
+ End Date: {exp['End Date']}
67
+ Industry: {exp['Industry']}
68
+ Description: {exp['Description']}
69
+ Skills: {exp['Skills']}
70
+ """
71
+ experience_prompts.append(experience_prompt)
72
+
73
+ combined_prompt = " ".join(experience_prompts)
74
+ prompt_template = f"""
75
+ Generate a professional LinkedIn experience section based on the following details:
76
+ {combined_prompt}
77
+ """
78
+
79
+ try:
80
+ response = model.generate_content([prompt_template])
81
+ st.subheader("Generated Experience Section")
82
+ st.write("Based on your input, here's the generated experience section for your LinkedIn profile:")
83
+ st.write(response.text)
84
+ except Exception as e:
85
+ st.error("An error occurred while generating your LinkedIn experience section. Please try again later.")
86
+ st.error(f"Error: {e}")
87
+
88
+ if __name__ == "__main__":
89
+ app()
newpage.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def app():
5
+ st.title('Gemini API Responses')
6
+
7
+ try:
8
+ # Load the responses from the file
9
+ with open('gemini_responses.json', 'r') as file:
10
+ responses = json.load(file)
11
+ except FileNotFoundError:
12
+ st.error("Responses file not found. Please run the main application first.")
13
+ return
14
+
15
+ for section_name, response_text in responses.items():
16
+ st.subheader(f"{section_name.replace('_', ' ').title()}")
17
+ st.write(response_text)
18
+
19
+ if __name__ == "__main__":
20
+ app()
preference.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def app():
5
+ st.header("Career Preferences")
6
+
7
+ preferences_sections = [
8
+ "Size of Organization",
9
+ "Type of Organization",
10
+ "Industry",
11
+ "Department",
12
+ "Function"
13
+ ]
14
+
15
+ preferences_questions = ["What I think I want", "What I know I don’t want"]
16
+
17
+ # Initialize preferences sets in session state if it doesn't exist
18
+ if 'preferences_sets' not in st.session_state:
19
+ st.session_state.preferences_sets = [{}]
20
+
21
+ # Function to add another set of preferences
22
+ def add_another_set():
23
+ st.session_state.preferences_sets.append({})
24
+
25
+ # Display current sets of preferences
26
+ for i, preferences_set in enumerate(st.session_state.preferences_sets):
27
+ with st.expander(f"Preferences Set {i + 1}", expanded=True):
28
+ for section in preferences_sections:
29
+ st.subheader(section)
30
+ for question in preferences_questions:
31
+ key = f"{section}_{question}_{i}"
32
+ st.session_state.preferences_sets[i][f"{section}: {question}"] = st.text_area(
33
+ label=question,
34
+ key=key,
35
+ value=preferences_set.get(f"{section}: {question}", "")
36
+ )
37
+
38
+ st.button("Add More", on_click=add_another_set)
39
+
40
+ if st.button('Save Preferences'):
41
+ save_preferences()
42
+ st.success('Preferences saved successfully!')
43
+
44
+ def save_preferences():
45
+ """Save the preferences sets to a JSON file."""
46
+ with open('preferences_sets.json', 'w') as file:
47
+ json.dump(st.session_state['preferences_sets'], file, indent=4)
48
+
49
+ if __name__ == "__main__":
50
+ app()
preferences_sets.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "Size of Organization: What I think I want": "Large, medium, small\n\n",
4
+ "Size of Organization: What I know I don\u2019t want": "partnership, soloperentership",
5
+ "Type of Organization: What I think I want": "domestic or\ninternational\n",
6
+ "Type of Organization: What I know I don\u2019t want": "branch office, satellite\noffice, family business\n",
7
+ "Industry: What I think I want": "financial services",
8
+ "Industry: What I know I don\u2019t want": "retail, banking, insurance",
9
+ "Department: What I think I want": "Finance, operations",
10
+ "Department: What I know I don\u2019t want": "sales",
11
+ "Function: What I think I want": "team leader, manager, executive",
12
+ "Function: What I know I don\u2019t want": "executive"
13
+ }
14
+ ]
process.py ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+ import google.generativeai as genai
4
+
5
+ # Placeholder for your API key - securely manage this in your actual application
6
+ API_KEY = "AIzaSyCA4__JMC_ZIQ9xQegIj5LOMLhSSrn3pMw"
7
+
8
+ def fetch_data_from_json(filename):
9
+ """Utility function to fetch data from a given JSON file."""
10
+ try:
11
+ with open(filename, 'r') as file:
12
+ return json.load(file)
13
+ except FileNotFoundError:
14
+ st.error(f"File {filename} not found. Please ensure it's in the correct path.")
15
+ return None
16
+
17
+ def app():
18
+ st.title('Career Insights and Recommendations')
19
+
20
+ # Paths to JSON files - adjust these paths as necessary
21
+ json_files = {
22
+ "core_values": "core_values_responses.json",
23
+ "strengths": "strength_responses.json",
24
+ "dream_job": "dream_job_info.json",
25
+ "strengths2": "dynamic_strength_responses.json",
26
+ "preferences": "preferences_sets.json",
27
+ "skills_experience": "skills_and_experience_sets.json",
28
+ "career_priorities": "career_priorities_data.json",
29
+ }
30
+
31
+ json_files["strengths"] = "strength_responses.json"
32
+ merge_json_files("strength_responses.json", "dynamic_strength_responses.json", "strength_responses.json")
33
+
34
+
35
+
36
+ comprehensive_data = {}
37
+ for key, file_path in json_files.items():
38
+ comprehensive_data[key] = fetch_data_from_json(file_path)
39
+
40
+ # Generate and display a comprehensive analysis based on all aspects
41
+ comprehensive_prompt = construct_comprehensive_prompt(comprehensive_data)
42
+ st.subheader("Comprehensive Career Analysis")
43
+ comprehensive_response_text = call_gemini(comprehensive_prompt)
44
+ st.text("Comprehensive API Response:")
45
+ st.write(comprehensive_response_text)
46
+
47
+ # Save the comprehensive response
48
+ save_responses("comprehensive_analysis", comprehensive_response_text)
49
+
50
+
51
+
52
+ def merge_json_files(file1, file2, output_file):
53
+ """Merge the contents of two JSON files and save the result in another file."""
54
+ try:
55
+ with open(file1, 'r') as file:
56
+ data1 = json.load(file)
57
+ with open(file2, 'r') as file:
58
+ data2 = json.load(file)
59
+
60
+ # Ensure data1 and data2 are dictionaries
61
+ if not isinstance(data1, dict):
62
+ data1 = {}
63
+ if not isinstance(data2, dict):
64
+ data2 = {}
65
+
66
+ merged_data = {**data1, **data2}
67
+
68
+ with open(output_file, 'w') as file:
69
+ json.dump(merged_data, file, indent=4)
70
+
71
+ st.success(f"Merged data saved to {output_file}.")
72
+ except FileNotFoundError:
73
+ st.error("One or more input files not found. Please ensure they are in the correct path.")
74
+
75
+
76
+ def process_section(section_name, data):
77
+ """
78
+ Processes each section individually by constructing a tailored prompt,
79
+ calling the Gemini API, and displaying the response.
80
+ """
81
+ prompt = construct_prompt(section_name, data)
82
+ st.subheader(f"{section_name.replace('_', ' ').title()} Analysis")
83
+ response_text = call_gemini(prompt)
84
+ st.text(f"{section_name.replace('_', ' ').title()} API Response:")
85
+ st.write(response_text)
86
+
87
+ # Save the response
88
+ save_responses(section_name, response_text)
89
+
90
+
91
+ def save_responses(section_name, response_text):
92
+ """Saves the API responses to a JSON file."""
93
+ try:
94
+ # Attempt to load existing data
95
+ with open('gemini_responses.json', 'r') as file:
96
+ responses = json.load(file)
97
+ except (FileNotFoundError, json.JSONDecodeError):
98
+ # If the file does not exist or contains invalid data, start with an empty dictionary
99
+ responses = {}
100
+
101
+ # Update the dictionary with the new response
102
+ responses[section_name] = response_text
103
+
104
+ # Save the updated dictionary back to the file
105
+ with open('gemini_responses.json', 'w') as file:
106
+ json.dump(responses, file, indent=4)
107
+
108
+
109
+ def construct_prompt(section_name, data):
110
+ """
111
+ Constructs a detailed and tailored prompt for a specific section,
112
+ guiding the model to provide insights and recommendations based on that section's data.
113
+ """
114
+ prompt_template = {
115
+ "career_priorities": "Analyze and evaluate user's current skill level related to these career priorities: {details}.",
116
+ "core_values": "Assess how user's current behaviours and skills align with these core values: {details}.",
117
+ "strengths": "Evaluate and highlight user's competency levels across these strengths: {details}.",
118
+ "dream_job": "Compare user's current skills and experience to the requirements of this dream job: {details}.",
119
+ "strengths2": "Summarize how user's friend's/collegs/seniors view user's capabilities based on this feedback: {details}.",
120
+ "preferences": "Judge how well user's skills and attributes fit these preferences: {details}.",
121
+ "skills_experience": "Assess user's current skill level within this area of expertise: {details}.",
122
+ }
123
+
124
+ # Constructing the tailored prompt
125
+ details = json.dumps(data, ensure_ascii=False)
126
+ prompt = prompt_template.get(section_name, "Please provide data for analysis.").format(details=details)
127
+ return prompt
128
+
129
+ def construct_comprehensive_prompt(data):
130
+ prompt_parts = [
131
+ "Given an individual's career aspirations, core values, strengths, preferences, and skills, provide a comprehensive analysis that identifies key strengths, aligns these with career values, and suggests career paths. Then, recommend the top 5 job descriptions that would be a perfect fit based on the analysis. Here are the details:",
132
+ f"Career Priorities: {json.dumps(data['career_priorities'], ensure_ascii=False)}",
133
+ f"Core Values: {json.dumps(data['core_values'], ensure_ascii=False)}",
134
+ "Rate the user's career priorities out of 100 and provide justification:",
135
+ f"Strengths: {json.dumps(data['strengths'], ensure_ascii=False)}",
136
+ "Rate the user's strengths out of 100 and provide justification:",
137
+ f"Dream Job Information: {json.dumps(data['dream_job'], ensure_ascii=False)}",
138
+ "Rate the user's dream job alignment out of 100 and provide justification:",
139
+ f"Preferences: {json.dumps(data['preferences'], ensure_ascii=False)}",
140
+ "Rate the user's preferences out of 100 and provide justification:",
141
+ f"Skills and Experience: {json.dumps(data['skills_experience'], ensure_ascii=False)}",
142
+ "Rate the user's skills and experience out of 100 and provide justification:",
143
+ "Based on the analysis, suggest 2-3 areas for mindful upskilling and professional development for the user, along with relevant certifications that would help strengthen their profile:",
144
+ "Consider the following in the further analysis:",
145
+ "- Given the strengths and dream job aspirations, what are the top industries or roles that would be a perfect fit?",
146
+ "- Based on the preferences, what work environment or company culture would be most suitable?",
147
+ "Conclude with recommendations for the top 5 open job descriptions in India aligned to the user's goals, including any specific industries or companies where these roles may be in demand currently.",
148
+ ]
149
+ prompt = "\n\n".join(prompt_parts)
150
+ return prompt
151
+
152
+ def call_gemini(prompt):
153
+ """Calls the Gemini API with the given prompt and returns the response."""
154
+ # Configure the API with your key
155
+ genai.configure(api_key=API_KEY)
156
+
157
+ # Set up the model configuration
158
+ generation_config = {
159
+ "temperature": 0.7,
160
+ "top_p": 0.95,
161
+ "max_output_tokens": 512,
162
+ }
163
+
164
+ safety_settings = [
165
+ {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
166
+ {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
167
+ {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
168
+ {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
169
+ ]
170
+
171
+ # Create the model instance
172
+ model = genai.GenerativeModel(model_name="gemini-1.0-pro",
173
+ generation_config=generation_config,
174
+ safety_settings=safety_settings)
175
+
176
+ # Generate content
177
+ try:
178
+ response = model.generate_content([prompt])
179
+ return response.text
180
+ except Exception as e:
181
+ return f"Error calling Gemini API: {e}"
182
+
183
+ if __name__ == "__main__":
184
+ app()
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ google-generativeai
resume.py ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+ import json
4
+
5
+ import google.generativeai as genai
6
+
7
+ API_KEY = "AIzaSyCA4__JMC_ZIQ9xQegIj5LOMLhSSrn3pMw"
8
+
9
+ def configure_genai_api():
10
+
11
+ genai.configure(api_key=API_KEY)
12
+ generation_config = {
13
+ "temperature": 0.9,
14
+ "top_p": 1,
15
+ "top_k": 40,
16
+ "max_output_tokens": 2048,
17
+ }
18
+ safety_settings = [
19
+ {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
20
+ {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
21
+ {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
22
+ {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
23
+ ]
24
+ return genai.GenerativeModel(model_name="gemini-1.0-pro",
25
+ generation_config=generation_config,
26
+ safety_settings=safety_settings)
27
+
28
+ def load_user_data():
29
+ try:
30
+ with open('gemini_responses.json', 'r') as file:
31
+ return json.load(file)
32
+ except FileNotFoundError:
33
+ st.error("User data file not found. Please ensure 'gemini_responses.json' exists.")
34
+ return {}
35
+
36
+ def load_data():
37
+ try:
38
+ with open('data.json', 'r') as file:
39
+ return json.load(file)
40
+ except FileNotFoundError:
41
+ st.error("Data file not found. Please ensure 'data.json' exists.")
42
+ return {}
43
+
44
+ def combine_responses(user_data, data, *args):
45
+ combined_responses = []
46
+ for key, value in user_data.items():
47
+ combined_responses.append(f"{key}: {value}")
48
+ combined_responses.append(f"Name: {data['name']}")
49
+ combined_responses.append(f"Email: {data['email']}")
50
+ combined_responses.append(f"LinkedIn: {data['linkedin']}")
51
+ combined_responses.append(f"GitHub: {data['github']}")
52
+ for response_set in args:
53
+ if isinstance(response_set, dict):
54
+ combined_responses.extend(response_set.values())
55
+ elif isinstance(response_set, list):
56
+ combined_responses.extend(response_set)
57
+ combined_responses.extend(data.values()) # Add data.json values
58
+ return " ".join(combined_responses)
59
+
60
+
61
+ def app():
62
+ st.header("Resume Creator")
63
+ model = configure_genai_api()
64
+ if not model:
65
+ return
66
+
67
+ # Load user data
68
+ user_data = load_user_data()
69
+ data = load_data()
70
+
71
+ combined_responses_text = combine_responses(user_data, data) # Pass the 'data' argument
72
+
73
+ prompt_template = f"""
74
+ Based on the following inputs, print the basic details in proper manner line by line (name, github url, etc), generate a professional resume that includes sections for a Summary, Experience, Skills, Certifications (dont give education section).
75
+ {combined_responses_text}
76
+ Provide optimized content for each section of the resume to highlight the individual's qualifications, achievements, and career progression.
77
+ """
78
+
79
+
80
+
81
+ try:
82
+ response = model.generate_content([prompt_template])
83
+ st.subheader("Resume Content")
84
+ st.write(response.text)
85
+ except Exception as e:
86
+ st.error("An error occurred while generating your Resume content. Please try again later.")
87
+ st.error(f"Error: {e}")
88
+
89
+ if __name__ == "__main__":
90
+ app()
skills.py ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+
3
+ import streamlit as st
4
+ import json
5
+
6
+ def app():
7
+ st.header("Skills and Experience Exercise")
8
+
9
+ core_skills_questions = [
10
+ "Job: Title or description – where and when?",
11
+ "Skills and experience: Direct or transferable",
12
+ "Accomplishments: Measurable; if possible include examples like percentage of goal, dollars in sales, revenue growth, or savings; number of employees hired or trained",
13
+ "Benefit to the Employer: how your skills and/or experience benefit the organization and its people"
14
+ ]
15
+
16
+ if 'skills_experience_sets' not in st.session_state:
17
+ st.session_state.skills_experience_sets = [{}]
18
+
19
+ # Function to add another set of questions
20
+ def add_another_set():
21
+ st.session_state.skills_experience_sets.append({})
22
+
23
+ # Display current sets of questions and responses
24
+ for i, skills_set in enumerate(st.session_state.skills_experience_sets):
25
+ with st.expander(f"Skills and Experience Set {i + 1}", expanded=True):
26
+ for question in core_skills_questions:
27
+ key = f"{question}_{i}"
28
+ st.session_state.skills_experience_sets[i][question] = st.text_area(
29
+ label=question,
30
+ key=key,
31
+ value=skills_set.get(question, "")
32
+ )
33
+
34
+ st.button("Add More", on_click=add_another_set)
35
+
36
+ if st.button('Save Skills and Experience'):
37
+ save_skills_and_experience()
38
+ st.success('Skills and Experience saved successfully!')
39
+
40
+ def save_skills_and_experience():
41
+ """Save the skills and experience sets to a JSON file."""
42
+ with open('skills_and_experience_sets.json', 'w') as file:
43
+ json.dump(st.session_state['skills_experience_sets'], file, indent=4)
44
+
45
+ if __name__ == "__main__":
46
+ app()
skills_and_experience_sets.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "Job: Title or description \u2013 where and when?": "Outbound Privilege Banker Gurgaon April-2011 March2012 Gurgaon\n",
4
+ "Skills and experience: Direct or transferable": " I learned that how to make good relationship with customer and how to do sales. Also my knowledge of banking product increased.\n",
5
+ "Accomplishments: Measurable; if possible include examples like percentage of goal, dollars in sales, revenue growth, or savings; number of employees hired or trained": " I closed 10 deals of insurance and made good relationship with customer",
6
+ "Benefit to the Employer: how your skills and/or experience benefit the organization and its people": "I acquired New to bank Customers in Branch which helped Bank to increase customer base"
7
+ },
8
+ {
9
+ "Job: Title or description \u2013 where and when?": "Inbound Privilege Banker April-12 to Mar14 Gurgaon",
10
+ "Skills and experience: Direct or transferable": "I Learned Branch operation, foreign exchange transactions",
11
+ "Accomplishments: Measurable; if possible include examples like percentage of goal, dollars in sales, revenue growth, or savings; number of employees hired or trained": " I was 2nd highest employee in my cluster for doing insurance (1.25 cr annual) Won many contest and award of appreciation (10-12) Won forex",
12
+ "Benefit to the Employer: how your skills and/or experience benefit the organization and its people": "Branch achieved his revenue target and got a staff who done foreign transaction"
13
+ }
14
+ ]
strength_responses.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "strength_responses": {
3
+ "What do you enjoy the most?": "I enjoy in doing my research myself and love to take decision independently to complete any task. Example- During my daughter birth i did all the research my self from choosing the right dctor hospital to till date. I enjoyed doing thatand feel satisfied. I do research in making travel plan from selecting destination till reaching home.",
4
+ "What am I called on to do most often?": "I am called on to do most often the task where coordination is required. In my office also i was given task to ensuring that one portfolio which was unmanned for so long, how to show it in positive note. For doing taht i had to approach different people of bank like, home loan , forex, personal loan , remittance and i did that after 3 months the portfolio becomes positive.",
5
+ "What do I do best?": "i always plan well in advance and take full ownership to complete the task. In achieving team productivity when ne team member has resigned or long leave it was my responsibility to meet team target. So i divide that member target in other team members so that it become small and it was easy to achieve. i do Multitask at one time.- I do multitasking in home or in workplace also. When in office i was doing Branch operations , Team management, Sending MIS and sales business on daily basis. I was custodian of locker operation . These multi task activity i was doing on daily basis. Currently also iam studying , attending session, cooking , meeting kid needs everything i am doing daily. Planning- i am good planner in terms of completing any task . Whenever there is any event in my house i start from scratch by planning all things in detail and finish it.",
6
+ "What advice or expertise do others seek from me?": "Others want to take advice on making decision like my husband do that in finalizing job offer. Patience- Others keep asking how i have so much patience. I handle my kid tantrum very calmly and in office whenever there is stress or tough situation i do not flow with that situation , i keep my calm and try to think how can it be solved."
7
+ },
8
+ "stories_feedback": {
9
+ "story_1": "There was one irate customer who was very potential but he was not happy\nwith HDFC. I went to meet him and understand his concern for not getting\ncredit card from HDFC as it was hitting his Ego. After taking approval and\nfollow up i get him deliver credit card which made him happy and after that\nhe became HNI customer of HDFC and gave many business to Bank.\n",
10
+ "feedback_1": "Good Communication, Commitment\nTo complete the target of my team i went up to the extra level for making\nthings work. Contact and Coordinate with other team members to get the\nthings done.\ncoordination\n",
11
+ "story_2": "When i initially joined the Team.\nTeam was new and very unstable\nand demotivated.\nIt was difficult to adjust myself in\nbetween them\nI interacted, guided and\nmotivated each one to come on\ntrack. It took effort and time but\nwhen my team was set every\nyear we were performers every\ntime.\n",
12
+ "feedback_2": "There was one customer who did\nnot receive the full amount from\natm and after 3 months of\nfollowup with two banks he did\nnot get the amount. Then i went\nup to many senior level to\nreopen his complaint and\nidentified the bank mistake in\ntallying the amount.\ndedication\n"
13
+ }
14
+ }
strengthpage2.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # strengthpage2.py
2
+ import streamlit as st
3
+ import json
4
+
5
+ def display_strength_exercise_3():
6
+ st.subheader("Strengths Exercise 3: Feedback from Your Network")
7
+
8
+ # Button to add more feedback forms
9
+ if 'network_feedback_list' not in st.session_state:
10
+ st.session_state['network_feedback_list'] = []
11
+
12
+ if st.button('Add More Feedback'):
13
+ st.session_state['network_feedback_list'].append({}) # Append an empty dictionary as a placeholder
14
+
15
+ # Initialize an index for each set of inputs
16
+ idx = 0
17
+ for feedback in st.session_state['network_feedback_list']:
18
+ with st.container():
19
+ st.write(f"Feedback #{idx + 1}")
20
+ name = st.text_input("Name", key=f"network_name_{idx}")
21
+ role = st.text_input("Role", key=f"network_role_{idx}")
22
+
23
+ feedback_questions = [
24
+ "What tasks am I best at?",
25
+ "How would you describe me to others?",
26
+ "What are not my strengths?",
27
+ "Preferred roles in projects?",
28
+ ]
29
+
30
+ # Store responses in the dictionary
31
+ feedback['name'] = name
32
+ feedback['role'] = role
33
+ feedback['responses'] = {}
34
+ for question in feedback_questions:
35
+ feedback['responses'][question] = st.text_area(question, key=f"{idx}_{question}")
36
+ idx += 1
37
+
38
+ if st.button('Save Network Feedback'):
39
+ # Save the feedback list to a file
40
+ with open('dynamic_strength_responses.json', 'w') as f:
41
+ json.dump(st.session_state['network_feedback_list'], f)
42
+ st.success('Network feedback saved successfully!')
43
+
44
+ def app():
45
+ display_strength_exercise_3()
46
+
47
+ if __name__ == "__main__":
48
+ app()
strengths.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import json
3
+
4
+ def app():
5
+ st.header("Let's explore your strengths.")
6
+
7
+ # Initialize session state for holding responses if not already present
8
+ if 'strength_responses' not in st.session_state:
9
+ st.session_state['strength_responses'] = {}
10
+ if 'stories_feedback' not in st.session_state:
11
+ st.session_state['stories_feedback'] = {}
12
+ if 'network_feedback' not in st.session_state:
13
+ st.session_state['network_feedback'] = {}
14
+
15
+ # Strengths Exercise 1 - Self Assessment
16
+ display_strength_exercise_1()
17
+
18
+ # Strengths Exercise 2 - Partner Assessment
19
+ display_strength_exercise_2()
20
+
21
+
22
+ # Save Button
23
+ if st.button('Save Data'):
24
+ save_data_to_file()
25
+
26
+ def display_strength_exercise_1():
27
+ st.subheader('Strength Exercise 1 - Self Assessment')
28
+ questions = [
29
+ "What do you enjoy the most?",
30
+ "What am I called on to do most often?",
31
+ "What do I do best?",
32
+ "What advice or expertise do others seek from me?",
33
+ ]
34
+ for question in questions:
35
+ st.session_state.strength_responses[question] = st.text_input(question, key=question)
36
+
37
+ def display_strength_exercise_2():
38
+ st.subheader('Strength Exercise 2 - Partner Assessment')
39
+ for i in range(1, 3):
40
+ story_key = f'story_{i}'
41
+ feedback_key = f'feedback_{i}'
42
+ with st.expander(f"Story {i} & Feedback"):
43
+ st.session_state.stories_feedback[story_key] = st.text_area(f"Story {i}", key=story_key)
44
+ st.session_state.stories_feedback[feedback_key] = st.text_area(f"Feedback for Story {i}", key=feedback_key)
45
+
46
+
47
+
48
+ def display_strength_responses():
49
+ st.header("Strength Responses")
50
+
51
+ # Load the strength responses
52
+ file_path = 'strength_responses.json'
53
+ try:
54
+ with open(file_path, 'r') as file:
55
+ responses = json.load(file)
56
+ except FileNotFoundError:
57
+ st.write("No strength responses found.")
58
+ return
59
+
60
+ # Display strength exercise 1 responses
61
+ st.subheader("Strength Exercise 1 - Self Assessment Responses")
62
+ for question, response in responses.get("strength_responses", {}).items():
63
+ st.markdown(f"**{question}**: {response}")
64
+
65
+ # Display strength exercise 2 responses
66
+ st.subheader("Strength Exercise 2 - Partner Assessment Responses")
67
+ for key, text in responses.get("stories_feedback", {}).items():
68
+ st.markdown(f"**{key.replace('_', ' ').capitalize()}**: {text}")
69
+
70
+
71
+ def save_data_to_file():
72
+ data_to_save = {
73
+ "strength_responses": st.session_state.strength_responses,
74
+ "stories_feedback": st.session_state.stories_feedback,
75
+ }
76
+ file_path = 'strength_responses.json' # You can adjust the file name as needed
77
+ with open(file_path, 'w') as file:
78
+ json.dump(data_to_save, file)
79
+ st.success("Data saved successfully!")
80
+
81
+
82
+ if __name__ == "__main__":
83
+ app()
summarize.py ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import google.generativeai as genai
3
+ import os
4
+
5
+ # Define a function to check if all sections are filled
6
+ def check_all_responses_filled(responses):
7
+ return all(responses) and all([all(responses[respondent]) for respondent in respondents])
8
+
9
+ # Configure the Google Generative AI API if the API key is available
10
+ def configure_genai_api():
11
+ api_key = os.getenv("GENAI_API_KEY")
12
+
13
+ if api_key is None:
14
+ st.error("API key not found. Please set the GENAI_API_KEY environment variable.")
15
+ return None
16
+ else:
17
+ genai.configure(api_key=api_key)
18
+
19
+ generation_config = {
20
+ "temperature": 0.9,
21
+ "top_p": 1,
22
+ "top_k": 40,
23
+ "max_output_tokens": 2048,
24
+ }
25
+
26
+ safety_settings = [
27
+ {"category": "HARM_CATEGORY_HARASSMENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
28
+ {"category": "HARM_CATEGORY_HATE_SPEECH", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
29
+ {"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
30
+ {"category": "HARM_CATEGORY_DANGEROUS_CONTENT", "threshold": "BLOCK_MEDIUM_AND_ABOVE"},
31
+ ]
32
+
33
+ return genai.GenerativeModel(model_name="gemini-1.0-pro",
34
+ generation_config=generation_config,
35
+ safety_settings=safety_settings)
36
+
37
+ # Function to combine responses from all sections
38
+ def combine_responses(saved_data):
39
+ def extract_strings(data):
40
+ if isinstance(data, dict):
41
+ return " ".join([extract_strings(value) for value in data.values()])
42
+ elif isinstance(data, list):
43
+ return " ".join([extract_strings(item) for item in data])
44
+ elif isinstance(data, str):
45
+ return data
46
+ else:
47
+ return ""
48
+
49
+ combined_responses = []
50
+ for section, responses in saved_data.items():
51
+ for response in responses.values():
52
+ combined_responses.append(extract_strings(response))
53
+ return " ".join(combined_responses)
54
+
55
+
56
+ def app():
57
+ st.header("Summary of Your Professional Profile")
58
+
59
+ # Check for environment variable and configure the API
60
+ model = configure_genai_api()
61
+ if not model:
62
+ return
63
+
64
+ # Display and collect all responses
65
+ all_responses = {
66
+ 'core_values': st.session_state.get('core_values_responses'),
67
+ 'strengths': st.session_state.get('strength_responses'),
68
+ 'partner_assessment': st.session_state.get('stories_feedback'),
69
+ 'network_feedback': st.session_state.get('network_feedback'),
70
+ 'skills': st.session_state.get('core_skills_responses'),
71
+ 'priorities': st.session_state.get('priorities_data_saved'),
72
+ 'preferences': st.session_state.get('preferences_responses'),
73
+ }
74
+
75
+ # Display all collected responses
76
+ for section, responses in all_responses.items():
77
+ if responses:
78
+ st.subheader(f"Your {section.replace('_', ' ').title()}:")
79
+ if isinstance(responses, dict):
80
+ for question, response in responses.items():
81
+ st.text(f"Q: {question}")
82
+ st.text(f"A: {response}")
83
+ elif isinstance(responses, list):
84
+ for response in responses:
85
+ st.text(response)
86
+ st.write("---") # Separator line
87
+
88
+ # Check if all sections are completed
89
+ all_responses_filled = all(responses is not None for responses in all_responses.values())
90
+
91
+ if st.button("Generate My Career Summary") and all_responses_filled:
92
+ combined_responses_text = combine_responses(all_responses)
93
+ prompt_template = """Make a summary of skills and experience. And future projection of what job a person can do next
94
+ Considering all above question responses including values, strengths, weaknesses
95
+ Recommend the best next career option this person can do and what upskilling they require
96
+ Suggest best certifications, best courses for this person
97
+ """
98
+ prompt = prompt_template + combined_responses_text
99
+
100
+ try:
101
+ # Attempt to generate a comprehensive career summary and future projection
102
+ response = model.generate_content([prompt])
103
+ if response and hasattr(response, 'parts'):
104
+ career_summary = ''.join([part['text'] for part in response.parts])
105
+ st.subheader("Career Summary and Projection")
106
+ st.write("Based on all the information you've provided, here's a comprehensive summary and future career projection tailored to you:")
107
+ st.info(career_summary)
108
+ else:
109
+ st.error("The response from the API was not in the expected format.")
110
+ except Exception as e:
111
+ st.error("An error occurred while generating your career summary. Please try again later.")
112
+ st.error(f"Error: {e}")
113
+ elif not all_responses_filled:
114
+ st.error("Please ensure all sections are completed to receive your comprehensive career summary.")
115
+
116
+ if __name__ == "__main__":
117
+ app()
values.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import streamlit as st
3
+
4
+ def app():
5
+ st.header("Identify Your Core Values")
6
+
7
+ core_value_questions = [
8
+ "What annoys you or gets under your skin at work?",
9
+ "What brings you joy in your work?",
10
+ "What could you not live without in a workplace or on a work team?",
11
+ "Who do you admire and what do you admire about them?"
12
+ ]
13
+
14
+
15
+ if 'core_values_responses' not in st.session_state:
16
+ st.session_state['core_values_responses'] = {question: "" for question in core_value_questions}
17
+
18
+ def update_response(question):
19
+ new_value = st.session_state[question]
20
+ st.session_state.core_values_responses[question] = new_value
21
+
22
+
23
+ for question in core_value_questions:
24
+ st.text_input(
25
+ label=question,
26
+ value=st.session_state.core_values_responses[question],
27
+ key=question,
28
+ on_change=update_response,
29
+ args=(question,)
30
+ )
31
+
32
+ if st.button('Save Core Values', key='save'):
33
+ save_responses_to_file(st.session_state.core_values_responses)
34
+ st.success('Core Values saved!')
35
+
36
+ def save_responses_to_file(responses, file_path='core_values_responses.json'):
37
+ with open(file_path, 'w') as file:
38
+ json.dump(responses, file)
39
+
40
+
41
+ if __name__ == "__main__":
42
+ app()