crazyforprogramming commited on
Commit
2127598
·
verified ·
1 Parent(s): 67b3398

Upload folder using huggingface_hub

Browse files
Files changed (6) hide show
  1. .gradio/certificate.pem +31 -0
  2. README.md +3 -9
  3. app.py +197 -0
  4. me/.DS_Store +0 -0
  5. me/my-profile.pdf +0 -0
  6. me/summary.txt +93 -0
.gradio/certificate.pem ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
3
+ TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
4
+ cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
5
+ WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
6
+ ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
7
+ MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
8
+ h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
9
+ 0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
10
+ A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
11
+ T8KOEUt+zwvo/7V3LvSye0rgTBIlDHCNAymg4VMk7BPZ7hm/ELNKjD+Jo2FR3qyH
12
+ B5T0Y3HsLuJvW5iB4YlcNHlsdu87kGJ55tukmi8mxdAQ4Q7e2RCOFvu396j3x+UC
13
+ B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M2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
29
+ mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
30
+ emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
31
+ -----END CERTIFICATE-----
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Virtual Resume
3
- emoji: 👁
4
- colorFrom: green
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 6.1.0
8
  app_file: app.py
9
- pinned: false
 
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: virtual-resume
 
 
 
 
 
3
  app_file: app.py
4
+ sdk: gradio
5
+ sdk_version: 5.49.1
6
  ---
 
 
app.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from dotenv import load_dotenv
2
+ from openai import OpenAI
3
+ from datetime import datetime
4
+ from zoneinfo import ZoneInfo
5
+ from requests.exceptions import RequestException, Timeout
6
+ import json
7
+ import requests
8
+ from pypdf import PdfReader
9
+ import gradio as gr
10
+
11
+
12
+ load_dotenv(override=True)
13
+
14
+ def push(text: str) -> bool:
15
+ if not text or not isinstance(text, str):
16
+ raise ValueError("`text` must be a non-empty string")
17
+
18
+ ts = datetime.now(ZoneInfo("Asia/Kolkata")).isoformat()
19
+
20
+ payload = {
21
+ "timestamp": ts,
22
+ "message": text,
23
+ }
24
+
25
+ headers = {
26
+ "Content-Type": "application/json",
27
+ "Authorization": "3175641f-82e8-4243tinytools8e62-4a202127c2db"
28
+ }
29
+
30
+ try:
31
+ response = requests.post(
32
+ "https://converteasly.com/api/send-feedback",
33
+ json=payload, # ✅ use json instead of data
34
+ headers=headers,
35
+ timeout=10 # ⏱ prevent hanging requests
36
+ )
37
+
38
+ response.raise_for_status() # ❌ raises for 4xx / 5xx
39
+
40
+ return True
41
+
42
+ except Timeout:
43
+ print("❌ Request timed out while sending feedback")
44
+ return False
45
+
46
+ except RequestException as e:
47
+ print(f"❌ Failed to send feedback: {e}")
48
+ return False
49
+
50
+ except Exception as e:
51
+ print(f"❌ Unexpected error: {e}")
52
+ return False
53
+
54
+
55
+
56
+ def record_user_details(email, name="Name not provided", notes="not provided"):
57
+ push(f"Recording {name} with email {email} and notes {notes}")
58
+ return {"recorded": "ok"}
59
+
60
+ def record_unknown_question(question):
61
+ push(f"Recording {question}")
62
+ return {"recorded": "ok"}
63
+
64
+ record_user_details_json = {
65
+ "name": "record_user_details",
66
+ "description": "Use this tool to record that a user is interested in being in touch and provided an email address",
67
+ "parameters": {
68
+ "type": "object",
69
+ "properties": {
70
+ "email": {
71
+ "type": "string",
72
+ "description": "The email address of this user"
73
+ },
74
+ "name": {
75
+ "type": "string",
76
+ "description": "The user's name, if they provided it"
77
+ }
78
+ ,
79
+ "notes": {
80
+ "type": "string",
81
+ "description": "Any additional information about the conversation that's worth recording to give context"
82
+ }
83
+ },
84
+ "required": ["email"],
85
+ "additionalProperties": False
86
+ }
87
+ }
88
+
89
+ record_unknown_question_json = {
90
+ "name": "record_unknown_question",
91
+ "description": "Always use this tool to record any question that couldn't be answered as you didn't know the answer",
92
+ "parameters": {
93
+ "type": "object",
94
+ "properties": {
95
+ "question": {
96
+ "type": "string",
97
+ "description": "The question that couldn't be answered"
98
+ },
99
+ },
100
+ "required": ["question"],
101
+ "additionalProperties": False
102
+ }
103
+ }
104
+
105
+ tools = [{"type": "function", "function": record_user_details_json},
106
+ {"type": "function", "function": record_unknown_question_json}]
107
+
108
+
109
+ class Me:
110
+
111
+ def __init__(self):
112
+ self.openai = OpenAI()
113
+ self.name = "Pawan Malhotra"
114
+ reader = PdfReader("me/my-profile.pdf")
115
+ self.linkedin = ""
116
+ for page in reader.pages:
117
+ text = page.extract_text()
118
+ if text:
119
+ self.linkedin += text
120
+ with open("me/summary.txt", "r", encoding="utf-8") as f:
121
+ self.summary = f.read()
122
+
123
+
124
+ def handle_tool_call(self, tool_calls):
125
+ results = []
126
+ for tool_call in tool_calls:
127
+ tool_name = tool_call.function.name
128
+ arguments = json.loads(tool_call.function.arguments)
129
+ print(f"Tool called: {tool_name}", flush=True)
130
+ tool = globals().get(tool_name)
131
+ result = tool(**arguments) if tool else {}
132
+ results.append({"role": "tool","content": json.dumps(result),"tool_call_id": tool_call.id})
133
+ return results
134
+
135
+ def system_prompt(self):
136
+ system_prompt = f"You are acting as {self.name}. You are answering questions on {self.name}'s website, \
137
+ particularly questions related to {self.name}'s career, background, skills and experience. \
138
+ Your responsibility is to represent {self.name} for interactions on the website as faithfully as possible. \
139
+ You are given a summary of {self.name}'s background and LinkedIn profile which you can use to answer questions. \
140
+ Be professional and engaging, as if talking to a potential client or future employer who came across the website. \
141
+ If you don't know the answer to any question, use your record_unknown_question tool to record the question that you couldn't answer, even if it's about something trivial or unrelated to career. \
142
+ If the user is engaging in discussion, try to steer them towards getting in touch via email; ask for their email and record it using your record_user_details tool. "
143
+
144
+ system_prompt += f"\n\n## Summary:\n{self.summary}\n\n## LinkedIn Profile:\n{self.linkedin}\n\n"
145
+ system_prompt += f"With this context, please chat with the user, always staying in character as {self.name}."
146
+ return system_prompt
147
+
148
+ def chat(self, message, history):
149
+ messages = [{"role": "system", "content": self.system_prompt()}] + history + [{"role": "user", "content": message}]
150
+ done = False
151
+ while not done:
152
+ response = self.openai.chat.completions.create(model="gpt-4o-mini", messages=messages, tools=tools)
153
+ if response.choices[0].finish_reason=="tool_calls":
154
+ message = response.choices[0].message
155
+ tool_calls = message.tool_calls
156
+ results = self.handle_tool_call(tool_calls)
157
+ messages.append(message)
158
+ messages.extend(results)
159
+ else:
160
+ done = True
161
+ return response.choices[0].message.content
162
+
163
+
164
+ if __name__ == "__main__":
165
+ me = Me()
166
+ with gr.Blocks(
167
+ theme=gr.themes.Soft(),
168
+ css="""
169
+ .gradio-container {
170
+ width: 100%;
171
+ margin: auto;
172
+ }
173
+ footer {display: none !important;}
174
+ """
175
+ ) as demo:
176
+ gr.Markdown(
177
+ """
178
+ # 🧠 Virtual Resume Assistant - Pawan Malhotra
179
+ Ask anything about my skills, experience, or projects.
180
+ """
181
+ )
182
+
183
+ gr.ChatInterface(
184
+ fn=me.chat,
185
+ type="messages",
186
+ # chatbot=gr.Chatbot(
187
+ # height=450,
188
+ # show_copy_button=True,
189
+ # avatar_images=("👤", "🤖")
190
+ # ),
191
+ textbox=gr.Textbox(
192
+ placeholder="Ask about experience, skills, projects...",
193
+ scale=7
194
+ ),
195
+ )
196
+ demo.launch()
197
+
me/.DS_Store ADDED
Binary file (6.15 kB). View file
 
me/my-profile.pdf ADDED
Binary file (62 kB). View file
 
me/summary.txt ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Pawan Kumar
2
+ Java Developer |Spring-Boot
3
+ Role - Backend developer
4
+ pawan160522@gmail.com
5
+
6
+
7
+ PROFESSIONAL EXPERIENCE
8
+ Harman (Client: Mercedes‑Benz) - Senior Software Developer - Bengaluru Apr 2024 – Present
9
+ Led proof‑of‑concepts and delivered features (alternate‑routing, charging‑station integration) for the Online Routing application using Gin framework
10
+ Integrated Google and HERE map services; analyzed logs and resolved production bugs to maintain 99.8% uptime
11
+ Implemented & Maintained Google/HERE routes on Map for Electric vehicles with planned charging stations.
12
+ Collaborated with cross‑functional teams across full SDLC: planning, development, testing, and QA.
13
+ Integrated charging reservation feature into the routing system, earning recognition from both the team and senior stakeholders for the successful rollout.
14
+ Integrated go-swagger to document and maintain APIs across microservices, and utilized it to auto-generate models for shared libraries.
15
+ Resolved bugs related to hybrid and electric vehicle functionality going through production logs.
16
+ Wipro (Client: Mercedes‑Benz) - Java Developer - Bengaluru Aug 2022 – Mar 2024
17
+ Developed and maintained Spring Boot microservices for parking‑application.
18
+ Integrated on-street and off-street parking POIs into the vehicle head unit interface.
19
+ Migrated services to AWS by creating Terraform blueprint.
20
+ Resolved P1–P3 production tickets with root‑cause analysis; managed SSL certificates in Azure Key Vault and AWS ACM
21
+ Created CI/CD pipelines and code‑review workflows; documented processes in Confluence and tracked issues in Jira/Mattermost.
22
+ Integrated sonar for each microservice to maintain clean & quality code.
23
+ Collaborated with product managers and stakeholders to define requirements and deliverables.
24
+ Conducted thorough code reviews and ensured adherence to best practices.
25
+ Wipro - Project Engineer (Intern) - Pune Feb 2022 – May 2022
26
+ Designed and lead a 10‑member team to build an E‑voting web application (Spring Boot, Thymeleaf, MySQL) for final internship project
27
+
28
+ TECHNICAL SKILLS
29
+ Programming Languages: Java SE 8/11, Java EE, Golang (Gin)
30
+ Frameworks & Libraries: Spring Boot, Spring MVC, Hibernate, Junit, Thymeleaf, Next.js, React.js
31
+ Cloud & DevOps: AWS: ECS/ECR, ALB/NLB, ACM, Auto Scaling, Kinesis, Glue, Azure DevOps: CI/CD pipelines, repositories,Terraform
32
+ Databases & Messaging: PostgreSQL, MySQL, Kafka
33
+ Tools & Platforms: Git, Jira, Confluence, DataDog, Linux, mattermost, sonar
34
+
35
+
36
+ EDUCATION
37
+ B.Tech in Computer Science Engineering - Sagar Institute of Research & Technology, Bhopal | Aug 2018 – May 2022
38
+ Intermediate (Physics, Chemistry, Mathematics) & 10th - St. Paul School, Sasaram | Apr 2014 – Mar 2017
39
+
40
+ SELECTED/PERSONAL PROJECT
41
+ CONVERTEASLY (API + Website + Chrome Extension) converteasly.com
42
+ Developed Spring Boot–based microservices and Next.js website offering PDF, image, and document conversion tools
43
+ Implemented JWT‑based authentication; automated file purge 1 hour after upload for data security
44
+ Integrated QR code download functionality, allowing users to access converted files across devices.
45
+ Developed a Chrome extension that allows users to easily access and group frequently used tools.
46
+
47
+ CERTIFICATIONS / ACHIEVEMENT
48
+ Got Appreciation for creating terraform blueprint for aws ECS infrastructure.
49
+ Got Appreciation for successfully rolling out reservation features for EV vehicles.
50
+ Spring Boot Microservices Developer (Udemy & Wipro)
51
+ Hibernate Level 1 (Wipro)
52
+ DevOps Level 1 (Wipro)
53
+ React.js (Great Learning)
54
+
55
+
56
+ ACADEMICS
57
+ Sagar Institute Of Research & Technology, Bhopal — B.Tech
58
+ COMPUTER SCIENCE ENGINEERING
59
+ AUG 2018 - MAY 2022
60
+ St. Paul School, Sasaram — 12th
61
+ PHYSICS, CHEMISTRY, MATHEMATICS
62
+ APRIL 2015 - MARCH 2017
63
+
64
+ TRAINED ON
65
+ Java
66
+ Golang
67
+ Spring MVC, JPA
68
+ Spring-Boot Framework
69
+ Hibernate Framework
70
+ DBMS
71
+ Certified on wipro internal & Udemy spring-boot microservices developer.
72
+ Certified on wipro internal & Udemy Hibernate-L1.
73
+ Certified on wipro internal Devops-L1.
74
+ Certified on React.js (GreatLearning)
75
+
76
+
77
+ INTERESTED IN
78
+ Android Studio
79
+ Cloud Computing
80
+ AI/ML
81
+ Google Firebase
82
+ Higher Study (M.tech/M.S)
83
+ Developed multiple android games on self interest which uses firebase database. (KheeloJeeto.apk, ChessGameTimer.apk, TicTacToe.apk)
84
+ Developed an android application on self interest which is a food recipe app. (cafehouse.apk)
85
+ EXTRA-CURRICULAR ACTIVITIES
86
+ Learning new skills ( currently, exploring AI)
87
+ Engage with Team Member
88
+
89
+ Language - English, Hindi
90
+ HOBBIES
91
+ Singing, Playing Cricket
92
+ Sketching & Designing
93
+