You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnhistory+ [[None, "Available candidates include: Kristy Natasha Yohanes, John Smith, and Sarah Johnson."]]
234
+
235
+
defcandidate_info(history):
236
+
returnhistory+ [[None, "Kristy Natasha Yohanes is an AI Engineer with 5 years of experience. She has skills in Python, TensorFlow, PyTorch, and NLP. She has a Master's degree in Computer Science."]]
237
+
238
+
defbest_candidate(history):
239
+
returnhistory+ [[None, "Based on the requirements for an AI Engineer role, Kristy Natasha Yohanes would be the best candidate. She has 5 years of experience in AI development and expertise in relevant technologies like TensorFlow and PyTorch."]]
240
+
202
241
defchat(message, history):
203
242
"""Handle chat messages"""
204
243
# Get relevant documents
@@ -234,9 +273,10 @@ def chat(message, history):
234
273
gr.Markdown("Ask me anything about candidates and hiring!")
235
274
236
275
chatbot=gr.Chatbot(
237
-
value=[["HiringHelp", "Hello, how can I help you today?"]],
276
+
value=[["", "Hello, how can I help you today?"]],
238
277
height=600,
239
-
show_label=False
278
+
show_label=False,
279
+
type="messages"
240
280
)
241
281
242
282
withgr.Row():
@@ -250,18 +290,22 @@ def chat(message, history):
250
290
251
291
# Example questions
252
292
gr.Markdown("### Try these example questions:")
293
+
253
294
withgr.Row():
254
-
gr.Button("List all the available candidates")
255
-
gr.Button("Tell me about a candidate named Kristy Natasha Yohanes")
256
-
gr.Button("Which candidate is best for an AI Engineer role?")
295
+
btn1=gr.Button("List all the available candidates")
296
+
btn2=gr.Button("Tell me about a candidate named Kristy Natasha Yohanes")
297
+
btn3=gr.Button("Which candidate is best for an AI Engineer role?")
0 commit comments