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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
|
|
|
|
|
|
62 |
if __name__ == "__main__":
|
63 |
demo.launch()
|
|
|
1 |
+
# import gradio as gr
|
2 |
+
# from huggingface_hub import InferenceClient
|
3 |
+
|
4 |
+
# """
|
5 |
+
# For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
|
6 |
+
# """
|
7 |
+
# client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
8 |
+
|
9 |
+
|
10 |
+
# def respond(
|
11 |
+
# message,
|
12 |
+
# history: list[tuple[str, str]],
|
13 |
+
# system_message,
|
14 |
+
# max_tokens,
|
15 |
+
# temperature,
|
16 |
+
# top_p,
|
17 |
+
# ):
|
18 |
+
# messages = [{"role": "system", "content": system_message}]
|
19 |
+
|
20 |
+
# for val in history:
|
21 |
+
# if val[0]:
|
22 |
+
# messages.append({"role": "user", "content": val[0]})
|
23 |
+
# if val[1]:
|
24 |
+
# messages.append({"role": "assistant", "content": val[1]})
|
25 |
+
|
26 |
+
# messages.append({"role": "user", "content": message})
|
27 |
+
|
28 |
+
# response = ""
|
29 |
+
|
30 |
+
# for message in client.chat_completion(
|
31 |
+
# messages,
|
32 |
+
# max_tokens=max_tokens,
|
33 |
+
# stream=True,
|
34 |
+
# temperature=temperature,
|
35 |
+
# top_p=top_p,
|
36 |
+
# ):
|
37 |
+
# token = message.choices[0].delta.content
|
38 |
+
|
39 |
+
# response += token
|
40 |
+
# yield response
|
41 |
+
|
42 |
+
# """
|
43 |
+
# For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
44 |
+
# """
|
45 |
+
# demo = gr.ChatInterface(
|
46 |
+
# respond,
|
47 |
+
# additional_inputs=[
|
48 |
+
# gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
|
49 |
+
# gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
|
50 |
+
# gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
|
51 |
+
# gr.Slider(
|
52 |
+
# minimum=0.1,
|
53 |
+
# maximum=1.0,
|
54 |
+
# value=0.95,
|
55 |
+
# step=0.05,
|
56 |
+
# label="Top-p (nucleus sampling)",
|
57 |
+
# ),
|
58 |
+
# ],
|
59 |
+
# )
|
60 |
+
|
61 |
+
from langchain.chat_models import ChatOpenAI
|
62 |
+
from langchain.schema import AIMessage, HumanMessage
|
63 |
+
import openai
|
64 |
import gradio as gr
|
65 |
+
import os
|
66 |
+
|
67 |
+
os.environ["OPENAI_API_KEY"] = "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" # Replace with your key
|
68 |
+
llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-0613')
|
69 |
+
|
70 |
+
cv_json = {
|
71 |
+
"name": "Jisu Kim",
|
72 |
+
"location": "Atlanta, GA",
|
73 |
+
"email": "[email protected]",
|
74 |
+
"phone": "(470) 652 9854",
|
75 |
+
"linkedin": "https://www.linkedin.com/in/jisulog/",
|
76 |
+
"education": [
|
77 |
+
{
|
78 |
+
"institution": "Georgia Institute of Technology (GT)",
|
79 |
+
"degree": "Master of Science in Human-Computer Interaction",
|
80 |
+
"additional_program": "Undergraduate Exchange Program in Computer Science",
|
81 |
+
"location": "Atlanta, GA",
|
82 |
+
"completion_date": "May 2025"
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"institution": "Korea Advanced Institute of Science and Technology (KAIST)",
|
86 |
+
"degree": "Bachelor of Science in Computer Science, Minor in Artificial Intelligence",
|
87 |
+
"additional_major": "Double Major in Business and Technology Management",
|
88 |
+
"location": "Daejeon, Korea",
|
89 |
+
"completion_date": "August 2023"
|
90 |
+
}
|
91 |
+
],
|
92 |
+
"research_interests": {
|
93 |
+
"summary": "When I first used the collaborative features of Google Workspace, I was captivated by the potential of technology to support work efficiently. The hubo.turn_left() function in the KAIST Introduction to Programming course opened up the joyful world of computer science, and a machine learning internship at Samsung made me fall for Artificial Intelligence (AI). These experiences have led me to belief in the potential of AI and to dedicate myself to enriching the human experience with AI in professional environments. My goal is to develop technologies that enhance both human-to-human and human-to-AI interactions, making these interactions not only more efficient but also more understandable and actionable.",
|
94 |
+
"keywords": ["HCI", "Human-Centered AI", "Human-AI Interaction", "Human-AI Collaboration", "Explainable AI"]
|
95 |
+
},
|
96 |
+
"research_experience": [
|
97 |
+
{
|
98 |
+
"lab": "Design Intelligence Lab (DILab)",
|
99 |
+
"position": "Graduate Researcher",
|
100 |
+
"advisor": "Ashok Goel",
|
101 |
+
"location": "Atlanta, GA",
|
102 |
+
"duration": "Jan. 2024 – Present",
|
103 |
+
"project": "SAMI: AI-Mediated Social Interaction in online learning environments",
|
104 |
+
"responsibilities": ["Designed a learnersourcing system using an AI social agent to enhance both intrinsic and extrinsic motivation of learners."]
|
105 |
+
},
|
106 |
+
{
|
107 |
+
"lab": "KAIST Interaction Lab (KIXLab)",
|
108 |
+
"position": "Undergraduate Researcher",
|
109 |
+
"advisor": "Juho Kim",
|
110 |
+
"location": "Daejeon, Korea",
|
111 |
+
"duration": "Jan. 2022 – Aug. 2023",
|
112 |
+
"projects": [
|
113 |
+
{
|
114 |
+
"name": "StupidTutor",
|
115 |
+
"description": "Understanding users’ comprehension ability from inconsistent large language models (LLMs)",
|
116 |
+
"responsibilities": ["Identified five types of output inconsistencies and designed a user study to understand users’ interaction with LLMs.", "Spearheaded data analysis and visualization of a user study with 250+ participants using Pandas with Python and R.", "Developed the back-end for a user study interface using SQLite and Flask, collaborating with a front-end developer."]
|
117 |
+
},
|
118 |
+
{
|
119 |
+
"name": "Grinder",
|
120 |
+
"description": "Designing object detection based on human-AI collaboration in video commerce",
|
121 |
+
"responsibilities": ["Led 20+ remote unmoderated usability tests encompassing both qualitative studies and quantitative benchmark studies."]
|
122 |
+
}
|
123 |
+
]
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"lab": "GT Co-Well Computer Lab",
|
127 |
+
"position": "Undergraduate Researcher",
|
128 |
+
"advisor": "Jennifer Kim",
|
129 |
+
"location": "Atlanta, GA",
|
130 |
+
"duration": "Aug. 2022 – Dec.2022",
|
131 |
+
"project": "Pioneering virtual reality and explainable AI for neurodiversity in remote work scenarios",
|
132 |
+
"responsibilities": ["Contrasted and evaluated several AI models and created different styles of explanations to display AI predictions."]
|
133 |
+
}
|
134 |
+
],
|
135 |
+
"industry_experience": [
|
136 |
+
{
|
137 |
+
"company": "Samsung SDS Co., Ltd. (Samsung Data System)",
|
138 |
+
"position": "Machine Learning Intern",
|
139 |
+
"location": "Seoul, Korea",
|
140 |
+
"duration": "Mar. 2021 – Aug. 2021",
|
141 |
+
"project": "Developing a real-time background segmentation model for the video conference platform",
|
142 |
+
"achievements": ["Developed a PyTorch model achieving 1.5x speed, 34% reduced loss, and 14% fewer parameters than the base model.", "Leveraged unlabeled dataset training by knowledge distillation, improving accuracy by transfer learning and fine-tuning.", "Integrated the developed model into Knox Meeting, a Samsung video conferencing platform."]
|
143 |
+
},
|
144 |
+
{
|
145 |
+
"company": "Samsung Electronics Co., Ltd.",
|
146 |
+
"position": "Data Science Intern",
|
147 |
+
"location": "Seoul, Korea",
|
148 |
+
"duration": "Jul. 2020 – Aug. 2020",
|
149 |
+
"project": "Data analysis of Key Performance Indicators (KPIs) from LTE Evolved NodeBs (eNBs) statistical data for KPI Modeling",
|
150 |
+
"responsibilities": ["Extracted KPIs from LTE eNBs data and performed correlation analysis using Pandas with Python.", "Collaborated with machine learning developers to optimize LTE eNB KPI Modeling based on identified correlations."]
|
151 |
+
}
|
152 |
+
],
|
153 |
+
"publications": [
|
154 |
+
{
|
155 |
+
"title": "Engaging Learnersourcing with an AI Social Agent in Online Learning",
|
156 |
+
"authors": "Jisu Kim, Ashok Goel",
|
157 |
+
"conference": "L@S 2024 Workshop on Learnersourcing: Student-generated Content @ Scale."
|
158 |
+
},
|
159 |
+
{
|
160 |
+
"title": "One vs. Many: Comprehending Accurate Information from Multiple Erroneous and Inconsistent AI Generations",
|
161 |
+
"authors": "Yoonjoo Lee, Kihoon Son, Tae Soo Kim, Jisu Kim, John Joon Young Chung, Eytan Adar, Juho Kim",
|
162 |
+
"conference": "FAccT 2024: ACM Conference on Fairness, Accountability, and Transparency."
|
163 |
+
}
|
164 |
+
],
|
165 |
+
"projects": [
|
166 |
+
{
|
167 |
+
"name": "Understanding AI Use and Non-use in Slide Creation with Google Workspace",
|
168 |
+
"role": "Project Leader",
|
169 |
+
"advisor": "Richmond Wong",
|
170 |
+
"description": "Led the master’s project on ‘Understanding AI Use in Slide Creation Amongst Young Professionals in Tech Companies’ in a partnership with Google Workspace; Project ongoing."
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"name": "Seminars on Introduction to AI and Computer Vision at Samsung SDS",
|
174 |
+
"role": "Speaker and Blog Editor",
|
175 |
+
"description": "Hosted a monthly team seminar at Samsung SDS titled ‘Introduction to AI for Novices’ and ‘Background Segmentation using Deep Learning’ with content published on a Medium blog, achieving over 2k views monthly and a total of 40k views. Authored a highly popular blog post on ‘Image Classification’, which ranks in the top 3 Google search results in Korean."
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"name": "FORECST, Online Hackathon Website",
|
179 |
+
"role": "Project Leader",
|
180 |
+
"description": "Directed a team of 4 in the end-to-end website development from ideation to deployment using React.js and Firebase, facilitating remote participation during the COVID-19 pandemic."
|
181 |
+
}
|
182 |
+
],
|
183 |
+
"leadership_and_activities": [
|
184 |
+
{
|
185 |
+
"role": "Committee Member",
|
186 |
+
"organization": "GT International House",
|
187 |
+
"year": "2022"
|
188 |
+
},
|
189 |
+
{
|
190 |
+
"role": "Student President",
|
191 |
+
"organization": "KAIST School of Computing",
|
192 |
+
"year": "2020"
|
193 |
+
},
|
194 |
+
{
|
195 |
+
"role": "Project Leader",
|
196 |
+
"organization": "KAIST Mad Camp",
|
197 |
+
"year": "2019"
|
198 |
+
},
|
199 |
+
{
|
200 |
+
"role": "Mentor",
|
201 |
+
"organization": "Tanzania ICT Volunteers",
|
202 |
+
"year": "2019"
|
203 |
+
},
|
204 |
+
{
|
205 |
+
"role": "Team Leader",
|
206 |
+
"organization": "KAIST Badminton Club",
|
207 |
+
"year": "2019"
|
208 |
+
}
|
209 |
+
],
|
210 |
+
"teaching_experience": [
|
211 |
+
{
|
212 |
+
"organization": "NAVER Connect Foundation",
|
213 |
+
"role": "Coding Coach",
|
214 |
+
"location": "Seoul, Korea",
|
215 |
+
"duration": "May. 2021 – Jul. 2021",
|
216 |
+
"description": "Mentored 25 college-level and above students in the Python Boost course."
|
217 |
+
},
|
218 |
+
{
|
219 |
+
"organization": "LG Electronics Inc.",
|
220 |
+
"role": "Education Operations Mentor",
|
221 |
+
"location": "Daejeon, Korea",
|
222 |
+
"duration": "Mar. 2019 – Dec. 2019",
|
223 |
+
"description": "Organized Arduino, CAD, and 3D printer classes for 48 students from multicultural families."
|
224 |
+
}
|
225 |
+
],
|
226 |
+
"honors_and_awards": [
|
227 |
+
{
|
228 |
+
"award": "Outstanding Graduate Leadership Award",
|
229 |
+
"year": "2024"
|
230 |
+
},
|
231 |
+
{
|
232 |
+
"award": "Magna Cum Laude",
|
233 |
+
"year": "2024"
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"award": "GT International House I-Spirit Award",
|
237 |
+
"year": "2022"
|
238 |
+
},
|
239 |
+
{
|
240 |
+
"award": "Mirae Asset Park Hyeun Joo Foundation Overseas Exchange Scholarship",
|
241 |
+
"year": "2022"
|
242 |
+
},
|
243 |
+
{
|
244 |
+
"award": "2nd Place, World Friends Korea ICT Volunteers Project Award",
|
245 |
+
"year": "2019"
|
246 |
+
},
|
247 |
+
{
|
248 |
+
"award": "2nd Place, KAIST Athletics Doubles Badminton Award",
|
249 |
+
"year": "2018"
|
250 |
+
},
|
251 |
+
{
|
252 |
+
"award": "1st Place, KAIST Civil and Environmental Engineering Undergraduate Research Award",
|
253 |
+
"year": "2018"
|
254 |
+
}
|
255 |
+
],
|
256 |
+
"skills": {
|
257 |
+
"programming_languages": ["Python", "R", "Java", "JavaScript", "C", "C#", "CSS", "HTML", "PHP", "MATLAB", "Assembly"],
|
258 |
+
"frameworks_libraries": ["TensorFlow", "PyTorch", "Keras", "CUDA", "Scikit-Learn", "OpenCV", "React.js", "Node.js", "Pandas", "NumPy", "SciPy"],
|
259 |
+
"tools_software": ["Android Studio", "Git", "Linux", "Jupyter", "Arduino", "SQL", "MongoDB", "Flask", "Firebase", "Processing", "CAD", "Figma"]
|
260 |
+
}
|
261 |
+
}
|
262 |
+
|
263 |
+
def predict(message, history):
|
264 |
+
prompt = f"Given that: {cv_json} How can I assist with information on: {message}"
|
265 |
+
response = llm([HumanMessage(content=prompt)])
|
266 |
+
return response.content
|
267 |
|
268 |
+
# Example inputs as buttons
|
269 |
+
examples = [
|
270 |
+
"Tell me about your research.",
|
271 |
+
"What projects have you worked on?",
|
272 |
+
"How can I contact you?",
|
273 |
+
"What are your main research interests?"
|
274 |
+
]
|
275 |
|
276 |
+
# Launch the Gradio interface with example inputs
|
277 |
+
demo = gr.ChatInterface(predict, examples=examples).launch()
|
278 |
+
|
279 |
if __name__ == "__main__":
|
280 |
demo.launch()
|