Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
|
|
8 |
llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-0613')
|
9 |
|
10 |
question_json = os.getenv('QUESTION_JSON')
|
|
|
11 |
|
12 |
# question_json = {
|
13 |
# "questions": [
|
@@ -37,221 +38,221 @@ question_json = os.getenv('QUESTION_JSON')
|
|
37 |
# ]
|
38 |
# }
|
39 |
|
40 |
-
cv_json = {
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
}
|
255 |
|
256 |
def predict(message, history):
|
257 |
if find(message):
|
|
|
8 |
llm = ChatOpenAI(temperature=1.0, model='gpt-3.5-turbo-0613')
|
9 |
|
10 |
question_json = os.getenv('QUESTION_JSON')
|
11 |
+
cv_json = os.getenv('CV_JSON')
|
12 |
|
13 |
# question_json = {
|
14 |
# "questions": [
|
|
|
38 |
# ]
|
39 |
# }
|
40 |
|
41 |
+
# cv_json = {
|
42 |
+
# "name": "Jisu Kim",
|
43 |
+
# "location": "Atlanta, GA",
|
44 |
+
# "CV": "https://ddiddu.github.io/JisuKim_CV.pdf",
|
45 |
+
# "contact" : [
|
46 |
+
# {
|
47 |
+
# "email": "[email protected]",
|
48 |
+
# "phone": "(470) 652 9854",
|
49 |
+
# "linkedin": "https://www.linkedin.com/in/jisulog/",
|
50 |
+
# "twitter": "https://x.com/jisukiim?s=21",
|
51 |
+
# "invitation": "If you are interested in collaboration, please reach out to me! I'm always happy to chat!",
|
52 |
+
# }
|
53 |
+
# ],
|
54 |
+
# "education": [
|
55 |
+
# {
|
56 |
+
# "institution": "Georgia Institute of Technology (GT)",
|
57 |
+
# "degree": "Master of Science in Human-Computer Interaction",
|
58 |
+
# "additional_program": "Undergraduate Exchange Program in Computer Science",
|
59 |
+
# "location": "Atlanta, GA",
|
60 |
+
# "completion_date": "May 2025"
|
61 |
+
# },
|
62 |
+
# {
|
63 |
+
# "institution": "Korea Advanced Institute of Science and Technology (KAIST)",
|
64 |
+
# "degree": "Bachelor of Science in Computer Science, Minor in Artificial Intelligence",
|
65 |
+
# "additional_major": "Double Major in Business and Technology Management",
|
66 |
+
# "location": "Daejeon, Korea",
|
67 |
+
# "completion_date": "August 2023"
|
68 |
+
# }
|
69 |
+
# ],
|
70 |
+
# "research_interests": {
|
71 |
+
# "summary": "My research interests lie at the intersection of artificial intelligence (AI) and human-computer interaction (HCI). I am focused on enhancing both productivity tools and creativity support tools in learning environments. My goal is to develop AI technologies that enrich the learning experience and enhance human-AI interaction. Driven by my passion for creating human-centric AI technologies, I am applying to Ph.D. programs for Fall 2025.",
|
72 |
+
# "keywords": ["HCI", "Human-Centered AI", "Human-AI Interaction", "Human-AI Collaboration", "Learning Sciences"]
|
73 |
+
# },
|
74 |
+
# "current_project": [
|
75 |
+
# {
|
76 |
+
# "title": "Understanding AI Use and Non-use in Slide Creation with Google Workspace",
|
77 |
+
# "description": "The rise of advanced Artificial Intelligence (AI) tools has significantly altered how people create work deliverables. This project explores how AI has changed the landscape of slide creation. We aim to understand the user process, identify pain points, determine the AI tools used, and ascertain when and why people opt not to use AI tools. Our findings will inform improvements for Google Workspace products, especially Google Vids and Google Slides."
|
78 |
+
# },
|
79 |
+
# {
|
80 |
+
# "title": "SAMI: AI-Mediated Social Interaction in Online Learning Environments",
|
81 |
+
# "description": "SAMI (Social Agent Mediated Interactions) is an AI social agent that facilitates the building of social connections among online students through AI-mediated social interaction. AI-mediated social interaction, as defined by Wang et al. [11], is “the AI-facilitated process of building and maintaining social connections between in- dividuals through information inferred from people’s online posts.” SAMI addresses the pressing need for social connections, and the challenges of remote social interactions that online students often face, thus enhancing their sense of community and engagement in the learning process.",
|
82 |
+
# "workshop_paper": "http://jisulog.kim/workshop1.pdf"
|
83 |
+
# }
|
84 |
+
# ],
|
85 |
+
# # "research_experience": [
|
86 |
+
# # {
|
87 |
+
# # "lab": "Design Intelligence Lab (DILab)",
|
88 |
+
# # "position": "Graduate Researcher",
|
89 |
+
# # "advisor": "Ashok Goel",
|
90 |
+
# # "location": "Atlanta, GA",
|
91 |
+
# # "duration": "Jan. 2024 – Present",
|
92 |
+
# # "project": "SAMI: AI-Mediated Social Interaction in online learning environments",
|
93 |
+
# # "responsibilities": ["Designed a learnersourcing system using an AI social agent to enhance both intrinsic and extrinsic motivation of learners."]
|
94 |
+
# # },
|
95 |
+
# # {
|
96 |
+
# # "lab": "KAIST Interaction Lab (KIXLab)",
|
97 |
+
# # "position": "Undergraduate Researcher",
|
98 |
+
# # "advisor": "Juho Kim",
|
99 |
+
# # "location": "Daejeon, Korea",
|
100 |
+
# # "duration": "Jan. 2022 – Aug. 2023",
|
101 |
+
# # "projects": [
|
102 |
+
# # {
|
103 |
+
# # "name": "StupidTutor",
|
104 |
+
# # "description": "Understanding users’ comprehension ability from inconsistent large language models (LLMs)",
|
105 |
+
# # "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."]
|
106 |
+
# # },
|
107 |
+
# # {
|
108 |
+
# # "name": "Grinder",
|
109 |
+
# # "description": "Designing object detection based on human-AI collaboration in video commerce",
|
110 |
+
# # "responsibilities": ["Led 20+ remote unmoderated usability tests encompassing both qualitative studies and quantitative benchmark studies."]
|
111 |
+
# # }
|
112 |
+
# # ]
|
113 |
+
# # },
|
114 |
+
# # {
|
115 |
+
# # "lab": "GT Co-Well Computer Lab",
|
116 |
+
# # "position": "Undergraduate Researcher",
|
117 |
+
# # "advisor": "Jennifer Kim",
|
118 |
+
# # "location": "Atlanta, GA",
|
119 |
+
# # "duration": "Aug. 2022 – Dec.2022",
|
120 |
+
# # "project": "Pioneering virtual reality and explainable AI for neurodiversity in remote work scenarios",
|
121 |
+
# # "responsibilities": ["Contrasted and evaluated several AI models and created different styles of explanations to display AI predictions."]
|
122 |
+
# # }
|
123 |
+
# # ],
|
124 |
+
# "industry_experience": [
|
125 |
+
# {
|
126 |
+
# "company": "Tesla Inc.",
|
127 |
+
# "position": "Incoming Machine Learning Intern",
|
128 |
+
# "location": "Fremont, CA",
|
129 |
+
# "duration": "Aug. 2024 – Jan. 2025",
|
130 |
+
# "project": "ML/NLP for data modeling, sales and customer analytics",
|
131 |
+
# },
|
132 |
+
# {
|
133 |
+
# "company": "Samsung SDS Co., Ltd. (Samsung Data System)",
|
134 |
+
# "position": "Machine Learning Intern",
|
135 |
+
# "location": "Seoul, Korea",
|
136 |
+
# "duration": "Mar. 2021 – Aug. 2021",
|
137 |
+
# "project": "Developing a real-time background segmentation model for the video conference platform",
|
138 |
+
# "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."]
|
139 |
+
# },
|
140 |
+
# {
|
141 |
+
# "company": "Samsung Electronics Co., Ltd.",
|
142 |
+
# "position": "Data Science Intern",
|
143 |
+
# "location": "Seoul, Korea",
|
144 |
+
# "duration": "Jul. 2020 – Aug. 2020",
|
145 |
+
# "project": "Data analysis of Key Performance Indicators (KPIs) from LTE Evolved NodeBs (eNBs) statistical data for KPI Modeling",
|
146 |
+
# "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."]
|
147 |
+
# }
|
148 |
+
# ],
|
149 |
+
# "publications": [
|
150 |
+
# {
|
151 |
+
# "title": "Engaging Learnersourcing with an AI Social Agent in Online Learning",
|
152 |
+
# "authors": "Jisu Kim, Ashok Goel",
|
153 |
+
# "conference": "L@S 2024 Workshop on Learnersourcing: Student-generated Content @ Scale.",
|
154 |
+
# "pdf": "http://jisulog.kim/workshop1.pdf",
|
155 |
+
# },
|
156 |
+
# {
|
157 |
+
# "title": "One vs. Many: Comprehending Accurate Information from Multiple Erroneous and Inconsistent AI Generations",
|
158 |
+
# "authors": "Yoonjoo Lee, Kihoon Son, Tae Soo Kim, Jisu Kim, John Joon Young Chung, Eytan Adar, Juho Kim",
|
159 |
+
# "conference": "FAccT 2024: ACM Conference on Fairness, Accountability, and Transparency.",
|
160 |
+
# "arxiv": "https://arxiv.org/abs/2405.05581",
|
161 |
+
# "description": "As Large Language Models (LLMs) are nondeterministic, the same input can generate different outputs, some of which may be incorrect or hallucinated. If run again, the LLM may correct itself and produce the correct answer. Unfortunately, most LLM-powered systems resort to single results which, correct or not, users accept. Having the LLM produce multiple outputs may help identify disagreements or alternatives. However, it is not obvious how the user will interpret conflicts or inconsistencies. To this end, we investigate how users perceive the AI model and comprehend the generated information when they receive multiple, potentially inconsistent, outputs. Through a preliminary study, we identified five types of output inconsistencies. Based on these categories, we conducted a study (N=252) in which participants were given one or more LLM-generated passages to an information-seeking question. We found that inconsistency within multiple LLM-generated outputs lowered the participants' perceived AI capacity, while also increasing their comprehension of the given information. Specifically, we observed that this positive effect of inconsistencies was most significant for participants who read two passages, compared to those who read three. Based on these findings, we present design implications that, instead of regarding LLM output inconsistencies as a drawback, we can reveal the potential inconsistencies to transparently indicate the limitations of these models and promote critical LLM usage."
|
162 |
+
# }
|
163 |
+
# ],
|
164 |
+
# # "projects": [
|
165 |
+
# # {
|
166 |
+
# # "name": "Seminars on Introduction to AI and Computer Vision at Samsung SDS",
|
167 |
+
# # "role": "Speaker and Blog Editor",
|
168 |
+
# # "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."
|
169 |
+
# # },
|
170 |
+
# # {
|
171 |
+
# # "name": "FORECST, Online Hackathon Website",
|
172 |
+
# # "role": "Project Leader",
|
173 |
+
# # "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.",
|
174 |
+
# # "demo": "https://www.youtube.com/watch?v=l5le0iE8PNc&ab_channel=JeanneChoi"
|
175 |
+
# # }
|
176 |
+
# # ],
|
177 |
+
# "leadership_and_activities": [
|
178 |
+
# {
|
179 |
+
# "role": "Committee Member",
|
180 |
+
# "organization": "GT International House",
|
181 |
+
# "year": "2022"
|
182 |
+
# },
|
183 |
+
# {
|
184 |
+
# "role": "Student President",
|
185 |
+
# "organization": "KAIST School of Computing",
|
186 |
+
# "year": "2020"
|
187 |
+
# },
|
188 |
+
# {
|
189 |
+
# "role": "Project Leader",
|
190 |
+
# "organization": "KAIST Mad Camp",
|
191 |
+
# "year": "2019"
|
192 |
+
# },
|
193 |
+
# {
|
194 |
+
# "role": "Mentor",
|
195 |
+
# "organization": "Tanzania ICT Volunteers",
|
196 |
+
# "year": "2019"
|
197 |
+
# },
|
198 |
+
# {
|
199 |
+
# "role": "Team Leader",
|
200 |
+
# "organization": "KAIST Badminton Club",
|
201 |
+
# "year": "2019"
|
202 |
+
# }
|
203 |
+
# ],
|
204 |
+
# "teaching_experience": [
|
205 |
+
# {
|
206 |
+
# "organization": "NAVER Connect Foundation",
|
207 |
+
# "role": "Coding Coach",
|
208 |
+
# "location": "Seoul, Korea",
|
209 |
+
# "duration": "May. 2021 – Jul. 2021",
|
210 |
+
# "description": "Mentored 25 college-level and above students in the Python Boost course."
|
211 |
+
# },
|
212 |
+
# {
|
213 |
+
# "organization": "LG Electronics Inc.",
|
214 |
+
# "role": "Education Operations Mentor",
|
215 |
+
# "location": "Daejeon, Korea",
|
216 |
+
# "duration": "Mar. 2019 – Dec. 2019",
|
217 |
+
# "description": "Organized Arduino, CAD, and 3D printer classes for 48 students from multicultural families."
|
218 |
+
# }
|
219 |
+
# ],
|
220 |
+
# "honors_and_awards": [
|
221 |
+
# {
|
222 |
+
# "award": "Outstanding Graduate Leadership Award",
|
223 |
+
# "year": "2024"
|
224 |
+
# },
|
225 |
+
# {
|
226 |
+
# "award": "Magna Cum Laude",
|
227 |
+
# "year": "2024"
|
228 |
+
# },
|
229 |
+
# {
|
230 |
+
# "award": "GT International House I-Spirit Award",
|
231 |
+
# "year": "2022"
|
232 |
+
# },
|
233 |
+
# {
|
234 |
+
# "award": "Mirae Asset Park Hyeun Joo Foundation Overseas Exchange Scholarship",
|
235 |
+
# "year": "2022"
|
236 |
+
# },
|
237 |
+
# {
|
238 |
+
# "award": "2nd Place, World Friends Korea ICT Volunteers Project Award",
|
239 |
+
# "year": "2019"
|
240 |
+
# },
|
241 |
+
# {
|
242 |
+
# "award": "2nd Place, KAIST Athletics Doubles Badminton Award",
|
243 |
+
# "year": "2018"
|
244 |
+
# },
|
245 |
+
# {
|
246 |
+
# "award": "1st Place, KAIST Civil and Environmental Engineering Undergraduate Research Award",
|
247 |
+
# "year": "2018"
|
248 |
+
# }
|
249 |
+
# ],
|
250 |
+
# "skills": {
|
251 |
+
# "programming_languages": ["Python", "R", "Java", "JavaScript", "C", "C#", "CSS", "HTML", "PHP", "MATLAB", "Assembly"],
|
252 |
+
# "frameworks_libraries": ["TensorFlow", "PyTorch", "Keras", "CUDA", "Scikit-Learn", "OpenCV", "React.js", "Node.js", "Pandas", "NumPy", "SciPy"],
|
253 |
+
# "tools_software": ["Android Studio", "Git", "Linux", "Jupyter", "Arduino", "SQL", "MongoDB", "Flask", "Firebase", "Processing", "CAD", "Figma"]
|
254 |
+
# }
|
255 |
+
# }
|
256 |
|
257 |
def predict(message, history):
|
258 |
if find(message):
|