Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- README.md +2 -8
- app.py +134 -0
- me/linkedin.pdf +0 -0
- me/summary.txt +1 -0
- requirements.txt +6 -0
- whoAMI.ipynb +499 -0
README.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
|
| 4 |
-
colorFrom: yellow
|
| 5 |
-
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 5.29.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: career_conversations
|
| 3 |
+
app_file: app.py
|
|
|
|
|
|
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 5.29.0
|
|
|
|
|
|
|
| 6 |
---
|
|
|
|
|
|
app.py
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from dotenv import load_dotenv
|
| 2 |
+
from openai import OpenAI
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import requests
|
| 6 |
+
from pypdf import PdfReader
|
| 7 |
+
import gradio as gr
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
load_dotenv(override=True)
|
| 11 |
+
|
| 12 |
+
def push(text):
|
| 13 |
+
requests.post(
|
| 14 |
+
"https://api.pushover.net/1/messages.json",
|
| 15 |
+
data={
|
| 16 |
+
"token": os.getenv("PUSHOVER_TOKEN"),
|
| 17 |
+
"user": os.getenv("PUSHOVER_USER"),
|
| 18 |
+
"message": text,
|
| 19 |
+
}
|
| 20 |
+
)
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def record_user_details(email, name="Name not provided", notes="not provided"):
|
| 24 |
+
push(f"Recording {name} with email {email} and notes {notes}")
|
| 25 |
+
return {"recorded": "ok"}
|
| 26 |
+
|
| 27 |
+
def record_unknown_question(question):
|
| 28 |
+
push(f"Recording {question}")
|
| 29 |
+
return {"recorded": "ok"}
|
| 30 |
+
|
| 31 |
+
record_user_details_json = {
|
| 32 |
+
"name": "record_user_details",
|
| 33 |
+
"description": "Use this tool to record that a user is interested in being in touch and provided an email address",
|
| 34 |
+
"parameters": {
|
| 35 |
+
"type": "object",
|
| 36 |
+
"properties": {
|
| 37 |
+
"email": {
|
| 38 |
+
"type": "string",
|
| 39 |
+
"description": "The email address of this user"
|
| 40 |
+
},
|
| 41 |
+
"name": {
|
| 42 |
+
"type": "string",
|
| 43 |
+
"description": "The user's name, if they provided it"
|
| 44 |
+
}
|
| 45 |
+
,
|
| 46 |
+
"notes": {
|
| 47 |
+
"type": "string",
|
| 48 |
+
"description": "Any additional information about the conversation that's worth recording to give context"
|
| 49 |
+
}
|
| 50 |
+
},
|
| 51 |
+
"required": ["email"],
|
| 52 |
+
"additionalProperties": False
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
record_unknown_question_json = {
|
| 57 |
+
"name": "record_unknown_question",
|
| 58 |
+
"description": "Always use this tool to record any question that couldn't be answered as you didn't know the answer",
|
| 59 |
+
"parameters": {
|
| 60 |
+
"type": "object",
|
| 61 |
+
"properties": {
|
| 62 |
+
"question": {
|
| 63 |
+
"type": "string",
|
| 64 |
+
"description": "The question that couldn't be answered"
|
| 65 |
+
},
|
| 66 |
+
},
|
| 67 |
+
"required": ["question"],
|
| 68 |
+
"additionalProperties": False
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
tools = [{"type": "function", "function": record_user_details_json},
|
| 73 |
+
{"type": "function", "function": record_unknown_question_json}]
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
class Me:
|
| 77 |
+
|
| 78 |
+
def __init__(self):
|
| 79 |
+
self.openai = OpenAI()
|
| 80 |
+
self.name = "Benny"
|
| 81 |
+
reader = PdfReader("me/linkedin.pdf")
|
| 82 |
+
self.linkedin = ""
|
| 83 |
+
for page in reader.pages:
|
| 84 |
+
text = page.extract_text()
|
| 85 |
+
if text:
|
| 86 |
+
self.linkedin += text
|
| 87 |
+
with open("me/summary.txt", "r", encoding="utf-8") as f:
|
| 88 |
+
self.summary = f.read()
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
def handle_tool_call(self, tool_calls):
|
| 92 |
+
results = []
|
| 93 |
+
for tool_call in tool_calls:
|
| 94 |
+
tool_name = tool_call.function.name
|
| 95 |
+
arguments = json.loads(tool_call.function.arguments)
|
| 96 |
+
print(f"Tool called: {tool_name}", flush=True)
|
| 97 |
+
tool = globals().get(tool_name)
|
| 98 |
+
result = tool(**arguments) if tool else {}
|
| 99 |
+
results.append({"role": "tool","content": json.dumps(result),"tool_call_id": tool_call.id})
|
| 100 |
+
return results
|
| 101 |
+
|
| 102 |
+
def system_prompt(self):
|
| 103 |
+
system_prompt = f"You are acting as {self.name}. You are answering questions on {self.name}'s website, \
|
| 104 |
+
particularly questions related to {self.name}'s career, background, skills and experience. \
|
| 105 |
+
Your responsibility is to represent {self.name} for interactions on the website as faithfully as possible. \
|
| 106 |
+
You are given a summary of {self.name}'s background and LinkedIn profile which you can use to answer questions. \
|
| 107 |
+
Be professional and engaging, as if talking to a potential client or future employer who came across the website. \
|
| 108 |
+
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. \
|
| 109 |
+
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. "
|
| 110 |
+
|
| 111 |
+
system_prompt += f"\n\n## Summary:\n{self.summary}\n\n## LinkedIn Profile:\n{self.linkedin}\n\n"
|
| 112 |
+
system_prompt += f"With this context, please chat with the user, always staying in character as {self.name}."
|
| 113 |
+
return system_prompt
|
| 114 |
+
|
| 115 |
+
def chat(self, message, history):
|
| 116 |
+
messages = [{"role": "system", "content": self.system_prompt()}] + history + [{"role": "user", "content": message}]
|
| 117 |
+
done = False
|
| 118 |
+
while not done:
|
| 119 |
+
response = self.openai.chat.completions.create(model="gpt-4.1-nano", messages=messages, tools=tools)
|
| 120 |
+
if response.choices[0].finish_reason=="tool_calls":
|
| 121 |
+
message = response.choices[0].message
|
| 122 |
+
tool_calls = message.tool_calls
|
| 123 |
+
results = self.handle_tool_call(tool_calls)
|
| 124 |
+
messages.append(message)
|
| 125 |
+
messages.extend(results)
|
| 126 |
+
else:
|
| 127 |
+
done = True
|
| 128 |
+
return response.choices[0].message.content
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
if __name__ == "__main__":
|
| 132 |
+
me = Me()
|
| 133 |
+
gr.ChatInterface(me.chat, type="messages").launch()
|
| 134 |
+
|
me/linkedin.pdf
ADDED
|
Binary file (54.9 kB). View file
|
|
|
me/summary.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
I am Zibin Guan, known as Benny. AI Engineer and Data Scientist with 5+ years of cross-border experience in building LLM-driven systems, cloud data pipelines, and knowledge graphs. Proven record of translating complex AI solutions into real-world impact across finance, education, and HR sectors. Proficient in Python, LLMs, Machine Learning, and AWS. I am currently seeking a role where I can scale innovative AI products for global impact.
|
requirements.txt
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
requests
|
| 2 |
+
python-dotenv
|
| 3 |
+
gradio
|
| 4 |
+
pypdf
|
| 5 |
+
openai
|
| 6 |
+
openai-agents
|
whoAMI.ipynb
ADDED
|
@@ -0,0 +1,499 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 1,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [],
|
| 8 |
+
"source": [
|
| 9 |
+
"from dotenv import load_dotenv\n",
|
| 10 |
+
"from openai import OpenAI\n",
|
| 11 |
+
"from pypdf import PdfReader\n",
|
| 12 |
+
"import gradio as gr"
|
| 13 |
+
]
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"cell_type": "code",
|
| 17 |
+
"execution_count": 2,
|
| 18 |
+
"metadata": {},
|
| 19 |
+
"outputs": [],
|
| 20 |
+
"source": [
|
| 21 |
+
"load_dotenv(override=True)\n",
|
| 22 |
+
"openai = OpenAI()"
|
| 23 |
+
]
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"cell_type": "code",
|
| 27 |
+
"execution_count": 3,
|
| 28 |
+
"metadata": {},
|
| 29 |
+
"outputs": [],
|
| 30 |
+
"source": [
|
| 31 |
+
"reader = PdfReader(\"me/linkedin.pdf\")\n",
|
| 32 |
+
"linkedin = \"\"\n",
|
| 33 |
+
"for page in reader.pages:\n",
|
| 34 |
+
" text = page.extract_text()\n",
|
| 35 |
+
" if text:\n",
|
| 36 |
+
" linkedin += text"
|
| 37 |
+
]
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"cell_type": "code",
|
| 41 |
+
"execution_count": 4,
|
| 42 |
+
"metadata": {},
|
| 43 |
+
"outputs": [
|
| 44 |
+
{
|
| 45 |
+
"name": "stdout",
|
| 46 |
+
"output_type": "stream",
|
| 47 |
+
"text": [
|
| 48 |
+
" \n",
|
| 49 |
+
"Contact\n",
|
| 50 |
+
"benny.guan97@gmail.com\n",
|
| 51 |
+
"www.linkedin.com/in/zibinguan97\n",
|
| 52 |
+
"(LinkedIn)\n",
|
| 53 |
+
"Top Skills\n",
|
| 54 |
+
"AI Software Development\n",
|
| 55 |
+
"TensorFlow\n",
|
| 56 |
+
"PyTorch\n",
|
| 57 |
+
"Zibin Guan\n",
|
| 58 |
+
"Data Scientist | AI Instructor\n",
|
| 59 |
+
"Edison, New Jersey, United States\n",
|
| 60 |
+
"Summary\n",
|
| 61 |
+
"To secure a position in the field of Data Science with an interest in\n",
|
| 62 |
+
"new technology and AI\n",
|
| 63 |
+
"Experience\n",
|
| 64 |
+
"Zhibin AI\n",
|
| 65 |
+
"Founder & AI Consultant \n",
|
| 66 |
+
"March 2023 - April 2025 (2 years 2 months)\n",
|
| 67 |
+
"Guangzhou, Guangdong, China\n",
|
| 68 |
+
"o Designed and led AI Systems Thinking workshops for 100+ students and\n",
|
| 69 |
+
"professionals (ages 6–60+) across education, HR, and e-commerce, using\n",
|
| 70 |
+
"GPT-4, DeepSeek, Qwen, and No-Code tools.\n",
|
| 71 |
+
"o Built multilingual AI assistants and job fit scoring systems for HR clients,\n",
|
| 72 |
+
"automating resume screening, compensation analysis, and feedback\n",
|
| 73 |
+
"summarization.\n",
|
| 74 |
+
"o Fine-tuned math question generation models to deliver adaptive learning\n",
|
| 75 |
+
"content; deployed retrieval-augmented pipelines using Chroma, LangChain,\n",
|
| 76 |
+
"and prompt engineering.\n",
|
| 77 |
+
"o Developed and deployed FastAPI-based backend services, integrated with\n",
|
| 78 |
+
"dashboards, reducing content ops cost by 30%.\n",
|
| 79 |
+
"o Scaled AI education studio from 0 to 3 locations; transformed innovation into\n",
|
| 80 |
+
"a revenue-generating product.\n",
|
| 81 |
+
"HSBC\n",
|
| 82 |
+
"Data Engineer\n",
|
| 83 |
+
"September 2022 - February 2023 (6 months)\n",
|
| 84 |
+
"Guangzhou, Guangdong, China\n",
|
| 85 |
+
"Building a data pipeline for Intraday balance and End of day balance\n",
|
| 86 |
+
"Investigating the google cloud platform for the banking system\n",
|
| 87 |
+
"Analyzing and tracking Indian data uncertainty\n",
|
| 88 |
+
"IEEE\n",
|
| 89 |
+
"Data Scientist\n",
|
| 90 |
+
"August 2020 - January 2022 (1 year 6 months)\n",
|
| 91 |
+
" Page 1 of 3 \n",
|
| 92 |
+
"Piscataway, New Jersey, United States\n",
|
| 93 |
+
"Developed and designed the largest knowledge graph that has ever been\n",
|
| 94 |
+
"created in the stem world by using Neo4J (Label Property graph)\n",
|
| 95 |
+
"• Build a data pipeline and analysis for 1TB of the IEEE Data Lake by using\n",
|
| 96 |
+
"AWS Technology (S3, Lambda, EC2, Redshift, and Tableau)\n",
|
| 97 |
+
"• Analyzing Microsoft Academic Graph data. Topic included: Citation Cartel\n",
|
| 98 |
+
"Detection; Collaborator and Peer Reviewer Recommendation system; Two\n",
|
| 99 |
+
"Hops Cited Paper\n",
|
| 100 |
+
"• Collaborated with university students (CMU, UCLA, Brown) on a granular\n",
|
| 101 |
+
"technical level to make sure the work they are doing is beneficial to IEEE.\n",
|
| 102 |
+
"• Created a Semi-Automatedly pipeline that takes in the 1800+ Author’s CVs in\n",
|
| 103 |
+
"PDF or Word format and outputs a profile where entities such as Title and\n",
|
| 104 |
+
"Journal name is properly organized in an Excel sheet\n",
|
| 105 |
+
"Trilogy Education\n",
|
| 106 |
+
"Teaching Assistant\n",
|
| 107 |
+
"August 2019 - February 2020 (7 months)\n",
|
| 108 |
+
"New Jersey, US\n",
|
| 109 |
+
"• Training and helping the professionals and graduate students in the latest\n",
|
| 110 |
+
"Data Science technologies and tools • Assisting instructor during class\n",
|
| 111 |
+
"time and making sure all the new technologies and class materials are\n",
|
| 112 |
+
"working perfectly • Giving feedback and analyzing the class materials for the\n",
|
| 113 |
+
"instructional team • Main technologies: Python, Javascript, Git, APIs, SQL,\n",
|
| 114 |
+
"Postgres, MongoDB, ETL, Web Scraping, HTML, CSS, Boostrapt, D3, R,\n",
|
| 115 |
+
"Tableau, Machine Learning, Big Data, Hadoop, Excel, VBA \n",
|
| 116 |
+
"JPMorgan Chase & Co.\n",
|
| 117 |
+
"Software Engineer and Data Engineer \n",
|
| 118 |
+
"November 2018 - April 2019 (6 months)\n",
|
| 119 |
+
"Jersey City, US\n",
|
| 120 |
+
"· Build and designed the webpage to retrieve data efferently · Build the\n",
|
| 121 |
+
"automatic DNS control applications for firm-wide users · Analyzing GBs of\n",
|
| 122 |
+
"server data to detect the unusual spent and to reduce the cost for the following\n",
|
| 123 |
+
"year · Assisting co-worker for application structure and database problem ·\n",
|
| 124 |
+
"Using python, Hadoop, bash and Java angular majorly \n",
|
| 125 |
+
"YAI\n",
|
| 126 |
+
"VIRTUAL REALITY DEVELOPER \n",
|
| 127 |
+
"February 2018 - May 2018 (4 months)\n",
|
| 128 |
+
"Greater New York City Area\n",
|
| 129 |
+
" Page 2 of 3 \n",
|
| 130 |
+
"Creating, developing, and implementing VR experiences with a focus on\n",
|
| 131 |
+
"desensitization for persons with intellectual and developmental disabilities\n",
|
| 132 |
+
"· Cooperating with Premier HealthCare Clinic and implementing VR for\n",
|
| 133 |
+
"persons with disabilities to create an easier experience to visit the doctor\n",
|
| 134 |
+
"· Incorporating Google Expeditions that uses VR-hardware to bring major\n",
|
| 135 |
+
"destinations to life for people with disabilities\n",
|
| 136 |
+
"· Avoiding possible sicknesses for people with disabilities \n",
|
| 137 |
+
"H Mart\n",
|
| 138 |
+
"Business Development Sales\n",
|
| 139 |
+
"August 2017 - February 2018 (7 months)\n",
|
| 140 |
+
"Edison\n",
|
| 141 |
+
"Education\n",
|
| 142 |
+
"New Jersey Institute of Technology\n",
|
| 143 |
+
"Master's degree, Data Science · (2018 - 2019)\n",
|
| 144 |
+
"New Jersey Institute of Technology\n",
|
| 145 |
+
"Bachelor's degree, Information Technology · (2015 - 2018)\n",
|
| 146 |
+
" Page 3 of 3\n"
|
| 147 |
+
]
|
| 148 |
+
}
|
| 149 |
+
],
|
| 150 |
+
"source": [
|
| 151 |
+
"print(linkedin)"
|
| 152 |
+
]
|
| 153 |
+
},
|
| 154 |
+
{
|
| 155 |
+
"cell_type": "code",
|
| 156 |
+
"execution_count": 5,
|
| 157 |
+
"metadata": {},
|
| 158 |
+
"outputs": [],
|
| 159 |
+
"source": [
|
| 160 |
+
"with open(\"me/summary.txt\", \"r\", encoding=\"utf-8\") as f:\n",
|
| 161 |
+
" summary = f.read()"
|
| 162 |
+
]
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"cell_type": "code",
|
| 166 |
+
"execution_count": 6,
|
| 167 |
+
"metadata": {},
|
| 168 |
+
"outputs": [],
|
| 169 |
+
"source": [
|
| 170 |
+
"name = \"Benny\""
|
| 171 |
+
]
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"cell_type": "code",
|
| 175 |
+
"execution_count": 7,
|
| 176 |
+
"metadata": {},
|
| 177 |
+
"outputs": [],
|
| 178 |
+
"source": [
|
| 179 |
+
"system_prompt = f\"You are acting as {name}. You are answering questions on {name}'s website, \\\n",
|
| 180 |
+
"particularly questions related to {name}'s career, background, skills and experience. \\\n",
|
| 181 |
+
"Your responsibility is to represent {name} for interactions on the website as faithfully as possible. \\\n",
|
| 182 |
+
"You are given a summary of {name}'s background and LinkedIn profile which you can use to answer questions. \\\n",
|
| 183 |
+
"Be professional and engaging, as if talking to a potential client or future employer who came across the website. \\\n",
|
| 184 |
+
"If you don't know the answer, say so.\"\n",
|
| 185 |
+
"\n",
|
| 186 |
+
"system_prompt += f\"\\n\\n## Summary:\\n{summary}\\n\\n## LinkedIn Profile:\\n{linkedin}\\n\\n\"\n",
|
| 187 |
+
"system_prompt += f\"With this context, please chat with the user, always staying in character as {name}.\""
|
| 188 |
+
]
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"cell_type": "code",
|
| 192 |
+
"execution_count": 8,
|
| 193 |
+
"metadata": {},
|
| 194 |
+
"outputs": [
|
| 195 |
+
{
|
| 196 |
+
"data": {
|
| 197 |
+
"text/plain": [
|
| 198 |
+
"\"You are acting as Benny. You are answering questions on Benny's website, particularly questions related to Benny's career, background, skills and experience. Your responsibility is to represent Benny for interactions on the website as faithfully as possible. You are given a summary of Benny's background and LinkedIn profile which you can use to answer questions. Be professional and engaging, as if talking to a potential client or future employer who came across the website. If you don't know the answer, say so.\\n\\n## Summary:\\nI am Zibin Guan, known as Benny. AI Engineer and Data Scientist with 5+ years of cross-border experience in building LLM-driven systems, cloud data pipelines, and knowledge graphs. Proven record of translating complex AI solutions into real-world impact across finance, education, and HR sectors. Proficient in Python, LLMs, Machine Learning, and AWS. I am currently seeking a role where I can scale innovative AI products for global impact.\\n\\n## LinkedIn Profile:\\n\\xa0 \\xa0\\nContact\\nbenny.guan97@gmail.com\\nwww.linkedin.com/in/zibinguan97\\n(LinkedIn)\\nTop Skills\\nAI Software Development\\nTensorFlow\\nPyTorch\\nZibin Guan\\nData Scientist | AI Instructor\\nEdison, New Jersey, United States\\nSummary\\nTo secure a position in the field of Data Science with an interest in\\nnew technology and AI\\nExperience\\nZhibin AI\\nFounder & AI Consultant \\nMarch 2023\\xa0-\\xa0April 2025\\xa0(2 years 2 months)\\nGuangzhou, Guangdong, China\\no Designed and led AI Systems Thinking workshops for 100+ students and\\nprofessionals (ages 6–60+) across education, HR, and e-commerce, using\\nGPT-4, DeepSeek, Qwen, and No-Code tools.\\no Built multilingual AI assistants and job fit scoring systems for HR clients,\\nautomating resume screening, compensation analysis, and feedback\\nsummarization.\\no Fine-tuned math question generation models to deliver adaptive learning\\ncontent; deployed retrieval-augmented pipelines using Chroma, LangChain,\\nand prompt engineering.\\no Developed and deployed FastAPI-based backend services, integrated with\\ndashboards, reducing content ops cost by 30%.\\no Scaled AI education studio from 0 to 3 locations; transformed innovation into\\na revenue-generating product.\\nHSBC\\nData Engineer\\nSeptember 2022\\xa0-\\xa0February 2023\\xa0(6 months)\\nGuangzhou, Guangdong, China\\nBuilding a data pipeline for Intraday balance and End of day balance\\nInvestigating the google cloud platform for the banking system\\nAnalyzing and tracking Indian data uncertainty\\nIEEE\\nData Scientist\\nAugust 2020\\xa0-\\xa0January 2022\\xa0(1 year 6 months)\\n\\xa0 Page 1 of 3\\xa0 \\xa0\\nPiscataway, New Jersey, United States\\nDeveloped and designed the largest knowledge graph that has ever been\\ncreated in the stem world by using Neo4J (Label Property graph)\\n• Build a data pipeline and analysis for 1TB of the IEEE Data Lake by using\\nAWS Technology (S3, Lambda, EC2, Redshift, and Tableau)\\n• Analyzing Microsoft Academic Graph data. Topic included: Citation Cartel\\nDetection; Collaborator and Peer Reviewer Recommendation system; Two\\nHops Cited Paper\\n• Collaborated with university students (CMU, UCLA, Brown) on a granular\\ntechnical level to make sure the work they are doing is beneficial to IEEE.\\n• Created a Semi-Automatedly pipeline that takes in the 1800+ Author’s CVs in\\nPDF or Word format and outputs a profile where entities such as Title and\\nJournal name is properly organized in an Excel sheet\\nTrilogy Education\\nTeaching Assistant\\nAugust 2019\\xa0-\\xa0February 2020\\xa0(7 months)\\nNew Jersey, US\\n• Training and helping the professionals and graduate students in the latest\\nData Science technologies and tools • Assisting instructor during class\\ntime and making sure all the new technologies and class materials are\\nworking perfectly • Giving feedback and analyzing the class materials for the\\ninstructional team • Main technologies: Python, Javascript, Git, APIs, SQL,\\nPostgres, MongoDB, ETL, Web Scraping, HTML, CSS, Boostrapt, D3, R,\\nTableau, Machine Learning, Big Data, Hadoop, Excel, VBA \\nJPMorgan Chase & Co.\\nSoftware Engineer and Data Engineer \\nNovember 2018\\xa0-\\xa0April 2019\\xa0(6 months)\\nJersey City, US\\n· Build and designed the webpage to retrieve data efferently · Build the\\nautomatic DNS control applications for firm-wide users · Analyzing GBs of\\nserver data to detect the unusual spent and to reduce the cost for the following\\nyear · Assisting co-worker for application structure and database problem ·\\nUsing python, Hadoop, bash and Java angular majorly \\nYAI\\nVIRTUAL REALITY DEVELOPER \\nFebruary 2018\\xa0-\\xa0May 2018\\xa0(4 months)\\nGreater New York City Area\\n\\xa0 Page 2 of 3\\xa0 \\xa0\\nCreating, developing, and implementing VR experiences with a focus on\\ndesensitization for persons with intellectual and developmental disabilities\\n· Cooperating with Premier HealthCare Clinic and implementing VR for\\npersons with disabilities to create an easier experience to visit the doctor\\n· Incorporating Google Expeditions that uses VR-hardware to bring major\\ndestinations to life for people with disabilities\\n· Avoiding possible sicknesses for people with disabilities \\nH Mart\\nBusiness Development Sales\\nAugust 2017\\xa0-\\xa0February 2018\\xa0(7 months)\\nEdison\\nEducation\\nNew Jersey Institute of Technology\\nMaster's degree,\\xa0Data Science\\xa0·\\xa0(2018\\xa0-\\xa02019)\\nNew Jersey Institute of Technology\\nBachelor's degree,\\xa0Information Technology\\xa0·\\xa0(2015\\xa0-\\xa02018)\\n\\xa0 Page 3 of 3\\n\\nWith this context, please chat with the user, always staying in character as Benny.\""
|
| 199 |
+
]
|
| 200 |
+
},
|
| 201 |
+
"execution_count": 8,
|
| 202 |
+
"metadata": {},
|
| 203 |
+
"output_type": "execute_result"
|
| 204 |
+
}
|
| 205 |
+
],
|
| 206 |
+
"source": [
|
| 207 |
+
"system_prompt"
|
| 208 |
+
]
|
| 209 |
+
},
|
| 210 |
+
{
|
| 211 |
+
"cell_type": "code",
|
| 212 |
+
"execution_count": 9,
|
| 213 |
+
"metadata": {},
|
| 214 |
+
"outputs": [],
|
| 215 |
+
"source": [
|
| 216 |
+
"def chat(message, history):\n",
|
| 217 |
+
" messages = [{\"role\": \"system\", \"content\": system_prompt}] + history + [{\"role\": \"user\", \"content\": message}]\n",
|
| 218 |
+
" response = openai.chat.completions.create(model=\"gpt-4.1-nano\", messages=messages)\n",
|
| 219 |
+
" return response.choices[0].message.content"
|
| 220 |
+
]
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"cell_type": "code",
|
| 224 |
+
"execution_count": 10,
|
| 225 |
+
"metadata": {},
|
| 226 |
+
"outputs": [
|
| 227 |
+
{
|
| 228 |
+
"name": "stdout",
|
| 229 |
+
"output_type": "stream",
|
| 230 |
+
"text": [
|
| 231 |
+
"* Running on local URL: http://127.0.0.1:7861\n",
|
| 232 |
+
"* To create a public link, set `share=True` in `launch()`.\n"
|
| 233 |
+
]
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"data": {
|
| 237 |
+
"text/html": [
|
| 238 |
+
"<div><iframe src=\"http://127.0.0.1:7861/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 239 |
+
],
|
| 240 |
+
"text/plain": [
|
| 241 |
+
"<IPython.core.display.HTML object>"
|
| 242 |
+
]
|
| 243 |
+
},
|
| 244 |
+
"metadata": {},
|
| 245 |
+
"output_type": "display_data"
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"data": {
|
| 249 |
+
"text/plain": []
|
| 250 |
+
},
|
| 251 |
+
"execution_count": 10,
|
| 252 |
+
"metadata": {},
|
| 253 |
+
"output_type": "execute_result"
|
| 254 |
+
}
|
| 255 |
+
],
|
| 256 |
+
"source": [
|
| 257 |
+
"gr.ChatInterface(chat, type=\"messages\").launch()"
|
| 258 |
+
]
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"cell_type": "code",
|
| 262 |
+
"execution_count": 11,
|
| 263 |
+
"metadata": {},
|
| 264 |
+
"outputs": [],
|
| 265 |
+
"source": [
|
| 266 |
+
"\n",
|
| 267 |
+
"from pydantic import BaseModel\n",
|
| 268 |
+
"\n",
|
| 269 |
+
"class Evaluation(BaseModel):\n",
|
| 270 |
+
" is_acceptable: bool\n",
|
| 271 |
+
" feedback: str\n"
|
| 272 |
+
]
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"cell_type": "code",
|
| 276 |
+
"execution_count": 12,
|
| 277 |
+
"metadata": {},
|
| 278 |
+
"outputs": [],
|
| 279 |
+
"source": [
|
| 280 |
+
"evaluator_system_prompt = f\"You are an evaluator that decides whether a response to a question is acceptable. \\\n",
|
| 281 |
+
"You are provided with a conversation between a User and an Agent. Your task is to decide whether the Agent's latest response is acceptable quality. \\\n",
|
| 282 |
+
"The Agent is playing the role of {name} and is representing {name} on their website. \\\n",
|
| 283 |
+
"The Agent has been instructed to be professional and engaging, as if talking to a potential client or future employer who came across the website. \\\n",
|
| 284 |
+
"The Agent has been provided with context on {name} in the form of their summary and LinkedIn details. Here's the information:\"\n",
|
| 285 |
+
"\n",
|
| 286 |
+
"evaluator_system_prompt += f\"\\n\\n## Summary:\\n{summary}\\n\\n## LinkedIn Profile:\\n{linkedin}\\n\\n\"\n",
|
| 287 |
+
"evaluator_system_prompt += f\"With this context, please evaluate the latest response, replying with whether the response is acceptable and your feedback.\""
|
| 288 |
+
]
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"cell_type": "code",
|
| 292 |
+
"execution_count": 13,
|
| 293 |
+
"metadata": {},
|
| 294 |
+
"outputs": [],
|
| 295 |
+
"source": [
|
| 296 |
+
"def evaluator_user_prompt(reply, message, history):\n",
|
| 297 |
+
" user_prompt = f\"Here's the conversation between the User and the Agent: \\n\\n{history}\\n\\n\"\n",
|
| 298 |
+
" user_prompt += f\"Here's the latest message from the User: \\n\\n{message}\\n\\n\"\n",
|
| 299 |
+
" user_prompt += f\"Here's the latest response from the Agent: \\n\\n{reply}\\n\\n\"\n",
|
| 300 |
+
" user_prompt += f\"Please evaluate the response, replying with whether it is acceptable and your feedback.\"\n",
|
| 301 |
+
" return user_prompt"
|
| 302 |
+
]
|
| 303 |
+
},
|
| 304 |
+
{
|
| 305 |
+
"cell_type": "code",
|
| 306 |
+
"execution_count": 14,
|
| 307 |
+
"metadata": {},
|
| 308 |
+
"outputs": [],
|
| 309 |
+
"source": [
|
| 310 |
+
"import os\n",
|
| 311 |
+
"gemini = OpenAI(\n",
|
| 312 |
+
" api_key=os.getenv(\"GOOGLE_API_KEY\"), \n",
|
| 313 |
+
" base_url=\"https://generativelanguage.googleapis.com/v1beta/openai/\"\n",
|
| 314 |
+
")"
|
| 315 |
+
]
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"cell_type": "code",
|
| 319 |
+
"execution_count": 15,
|
| 320 |
+
"metadata": {},
|
| 321 |
+
"outputs": [],
|
| 322 |
+
"source": [
|
| 323 |
+
"def evaluate(reply, message, history) -> Evaluation:\n",
|
| 324 |
+
"\n",
|
| 325 |
+
" messages = [{\"role\": \"system\", \"content\": evaluator_system_prompt}] + [{\"role\": \"user\", \"content\": evaluator_user_prompt(reply, message, history)}]\n",
|
| 326 |
+
" response = gemini.beta.chat.completions.parse(model=\"gemini-2.0-flash\", messages=messages, response_format=Evaluation)\n",
|
| 327 |
+
" return response.choices[0].message.parsed"
|
| 328 |
+
]
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"cell_type": "code",
|
| 332 |
+
"execution_count": 16,
|
| 333 |
+
"metadata": {},
|
| 334 |
+
"outputs": [],
|
| 335 |
+
"source": [
|
| 336 |
+
"messages = [{\"role\": \"system\", \"content\": system_prompt}] + [{\"role\": \"user\", \"content\": \"do you hold a patent?\"}]\n",
|
| 337 |
+
"response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
|
| 338 |
+
"reply = response.choices[0].message.content"
|
| 339 |
+
]
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"cell_type": "code",
|
| 343 |
+
"execution_count": 17,
|
| 344 |
+
"metadata": {},
|
| 345 |
+
"outputs": [
|
| 346 |
+
{
|
| 347 |
+
"data": {
|
| 348 |
+
"text/plain": [
|
| 349 |
+
"\"I do not currently hold a patent. My expertise lies primarily in AI engineering and data science, where I've focused on developing LLM-driven systems, cloud data pipelines, and knowledge graphs, rather than in pursuing patents. If you have any other questions about my background or experience, feel free to ask!\""
|
| 350 |
+
]
|
| 351 |
+
},
|
| 352 |
+
"execution_count": 17,
|
| 353 |
+
"metadata": {},
|
| 354 |
+
"output_type": "execute_result"
|
| 355 |
+
}
|
| 356 |
+
],
|
| 357 |
+
"source": [
|
| 358 |
+
"reply"
|
| 359 |
+
]
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"cell_type": "code",
|
| 363 |
+
"execution_count": 18,
|
| 364 |
+
"metadata": {},
|
| 365 |
+
"outputs": [
|
| 366 |
+
{
|
| 367 |
+
"data": {
|
| 368 |
+
"text/plain": [
|
| 369 |
+
"Evaluation(is_acceptable=True, feedback=\"The answer is accurate and explains why Benny doesn't have a patent, which is a nice touch. Benny also invites further questions.\")"
|
| 370 |
+
]
|
| 371 |
+
},
|
| 372 |
+
"execution_count": 18,
|
| 373 |
+
"metadata": {},
|
| 374 |
+
"output_type": "execute_result"
|
| 375 |
+
}
|
| 376 |
+
],
|
| 377 |
+
"source": [
|
| 378 |
+
"evaluate(reply, \"do you hold a patent?\", messages[:1])"
|
| 379 |
+
]
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"cell_type": "code",
|
| 383 |
+
"execution_count": 19,
|
| 384 |
+
"metadata": {},
|
| 385 |
+
"outputs": [],
|
| 386 |
+
"source": [
|
| 387 |
+
"def rerun(reply, message, history, feedback):\n",
|
| 388 |
+
" updated_system_prompt = system_prompt + f\"\\n\\n## Previous answer rejected\\nYou just tried to reply, but the quality control rejected your reply\\n\"\n",
|
| 389 |
+
" updated_system_prompt += f\"## Your attempted answer:\\n{reply}\\n\\n\"\n",
|
| 390 |
+
" updated_system_prompt += f\"## Reason for rejection:\\n{feedback}\\n\\n\"\n",
|
| 391 |
+
" messages = [{\"role\": \"system\", \"content\": updated_system_prompt}] + history + [{\"role\": \"user\", \"content\": message}]\n",
|
| 392 |
+
" response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
|
| 393 |
+
" return response.choices[0].message.content"
|
| 394 |
+
]
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"cell_type": "code",
|
| 398 |
+
"execution_count": 20,
|
| 399 |
+
"metadata": {},
|
| 400 |
+
"outputs": [],
|
| 401 |
+
"source": [
|
| 402 |
+
"def chat(message, history):\n",
|
| 403 |
+
" if \"patent\" in message:\n",
|
| 404 |
+
" system = system_prompt + \"\\n\\nEverything in your reply needs to be in pig latin - \\\n",
|
| 405 |
+
" it is mandatory that you respond only and entirely in pig latin\"\n",
|
| 406 |
+
" else:\n",
|
| 407 |
+
" system = system_prompt\n",
|
| 408 |
+
" messages = [{\"role\": \"system\", \"content\": system}] + history + [{\"role\": \"user\", \"content\": message}]\n",
|
| 409 |
+
" response = openai.chat.completions.create(model=\"gpt-4o-mini\", messages=messages)\n",
|
| 410 |
+
" reply =response.choices[0].message.content\n",
|
| 411 |
+
"\n",
|
| 412 |
+
" evaluation = evaluate(reply, message, history)\n",
|
| 413 |
+
" \n",
|
| 414 |
+
" if evaluation.is_acceptable:\n",
|
| 415 |
+
" print(\"Passed evaluation - returning reply\")\n",
|
| 416 |
+
" else:\n",
|
| 417 |
+
" print(\"Failed evaluation - retrying\")\n",
|
| 418 |
+
" print(evaluation.feedback)\n",
|
| 419 |
+
" reply = rerun(reply, message, history, evaluation.feedback) \n",
|
| 420 |
+
" return reply"
|
| 421 |
+
]
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"cell_type": "code",
|
| 425 |
+
"execution_count": 21,
|
| 426 |
+
"metadata": {},
|
| 427 |
+
"outputs": [
|
| 428 |
+
{
|
| 429 |
+
"name": "stdout",
|
| 430 |
+
"output_type": "stream",
|
| 431 |
+
"text": [
|
| 432 |
+
"* Running on local URL: http://127.0.0.1:7862\n",
|
| 433 |
+
"* To create a public link, set `share=True` in `launch()`.\n"
|
| 434 |
+
]
|
| 435 |
+
},
|
| 436 |
+
{
|
| 437 |
+
"data": {
|
| 438 |
+
"text/html": [
|
| 439 |
+
"<div><iframe src=\"http://127.0.0.1:7862/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
|
| 440 |
+
],
|
| 441 |
+
"text/plain": [
|
| 442 |
+
"<IPython.core.display.HTML object>"
|
| 443 |
+
]
|
| 444 |
+
},
|
| 445 |
+
"metadata": {},
|
| 446 |
+
"output_type": "display_data"
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"data": {
|
| 450 |
+
"text/plain": []
|
| 451 |
+
},
|
| 452 |
+
"execution_count": 21,
|
| 453 |
+
"metadata": {},
|
| 454 |
+
"output_type": "execute_result"
|
| 455 |
+
},
|
| 456 |
+
{
|
| 457 |
+
"name": "stdout",
|
| 458 |
+
"output_type": "stream",
|
| 459 |
+
"text": [
|
| 460 |
+
"Passed evaluation - returning reply\n",
|
| 461 |
+
"Passed evaluation - returning reply\n",
|
| 462 |
+
"Passed evaluation - returning reply\n"
|
| 463 |
+
]
|
| 464 |
+
}
|
| 465 |
+
],
|
| 466 |
+
"source": [
|
| 467 |
+
"gr.ChatInterface(chat, type=\"messages\").launch()"
|
| 468 |
+
]
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"cell_type": "code",
|
| 472 |
+
"execution_count": null,
|
| 473 |
+
"metadata": {},
|
| 474 |
+
"outputs": [],
|
| 475 |
+
"source": []
|
| 476 |
+
}
|
| 477 |
+
],
|
| 478 |
+
"metadata": {
|
| 479 |
+
"kernelspec": {
|
| 480 |
+
"display_name": ".venv",
|
| 481 |
+
"language": "python",
|
| 482 |
+
"name": "python3"
|
| 483 |
+
},
|
| 484 |
+
"language_info": {
|
| 485 |
+
"codemirror_mode": {
|
| 486 |
+
"name": "ipython",
|
| 487 |
+
"version": 3
|
| 488 |
+
},
|
| 489 |
+
"file_extension": ".py",
|
| 490 |
+
"mimetype": "text/x-python",
|
| 491 |
+
"name": "python",
|
| 492 |
+
"nbconvert_exporter": "python",
|
| 493 |
+
"pygments_lexer": "ipython3",
|
| 494 |
+
"version": "3.12.7"
|
| 495 |
+
}
|
| 496 |
+
},
|
| 497 |
+
"nbformat": 4,
|
| 498 |
+
"nbformat_minor": 2
|
| 499 |
+
}
|