jerpint commited on
Commit
d5f99ba
·
1 Parent(s): bcb354e

simpify chat app

Browse files
Files changed (1) hide show
  1. app.py +19 -22
app.py CHANGED
@@ -3,19 +3,16 @@ from openai import OpenAI
3
  import os
4
 
5
 
6
- WELCOME_MESSAGE = """Hello 👋
7
-
8
- I'm a chatbot assistant for [Jeremy Pinto (@jerpint)'s](https://www.jerpint.io) resume.
9
 
10
  Here's a quick overview of Jeremy:
11
- - AI Engineer with 7+ years of experience training and deploying AI models
12
- - Currently works at [Mila](www.mila.quebec) as a Senior Applied Research Scientist
13
  - Hosts a blog at [www.jerpint.io]()
14
 
15
- You can try things like copy+pasting a job description in the chat for me to analyze if Jeremy might be a good fit for the role.
16
  """
17
 
18
- SYSTEM_PROMPT = "You are a helpful assistant giving feedback and advice on resumes."
19
  PROMPT_TEMPLATE = """Here is all the information you need to know about a candidate, in markdown format:
20
 
21
  {resume_markdown}
@@ -85,19 +82,19 @@ def respond(
85
 
86
 
87
  with gr.Blocks() as demo:
88
- md = gr.Markdown("Interactive chat with Jeremy's resume. For more information, visit [jerpint.io/resume](https://www.jerpint.io/resume)")
89
- with gr.Tab("Resume (Chat)"):
90
-
91
- # Initialize history with a welcome message
92
- history = [
93
- {"role": "assistant", "content": WELCOME_MESSAGE},
94
- ]
95
-
96
- default_chatbot=gr.Chatbot(value=history, label="jerpint's assistant", type="messages")
97
- chatbot = gr.ChatInterface(
98
- respond,
99
- chatbot=default_chatbot,
100
- type="messages",
101
  )
102
 
103
  # with gr.Tab("Resume (HTML)"):
@@ -105,8 +102,8 @@ with gr.Blocks() as demo:
105
  # html_raw = f.read()
106
  # resume_html = gr.HTML(html_raw)
107
 
108
- with gr.Tab("Resume (PDF)"):
109
- md = gr.Markdown("[Link to PDF](https://huggingface.co/spaces/jerpint/talk-to-resume/resolve/main/resume.pdf)")
110
 
111
  md = gr.Markdown("Created by [Jeremy Pinto](https://www.jerpint.io)")
112
 
 
3
  import os
4
 
5
 
6
+ WELCOME_MESSAGE = """Hello 👋 I'm a chatbot assistant for [Jeremy Pinto (@jerpint)'s](https://www.jerpint.io) resume.
 
 
7
 
8
  Here's a quick overview of Jeremy:
9
+ - Member of Tehcnical staff at Onix
 
10
  - Hosts a blog at [www.jerpint.io]()
11
 
12
+ How can I help?
13
  """
14
 
15
+ SYSTEM_PROMPT = "You are a helpful assistant prodiving answers given a candidate's resume."
16
  PROMPT_TEMPLATE = """Here is all the information you need to know about a candidate, in markdown format:
17
 
18
  {resume_markdown}
 
82
 
83
 
84
  with gr.Blocks() as demo:
85
+ # md = gr.Markdown("Interactive chat with Jeremy's resume. For more information, visit [jerpint.io/resume](https://www.jerpint.io/resume)")
86
+ # with gr.Tab("Resume (Chat)"):
87
+
88
+ # Initialize history with a welcome message
89
+ history = [
90
+ {"role": "assistant", "content": WELCOME_MESSAGE},
91
+ ]
92
+
93
+ default_chatbot=gr.Chatbot(value=history, label="jerpint's assistant", type="messages")
94
+ chatbot = gr.ChatInterface(
95
+ respond,
96
+ chatbot=default_chatbot,
97
+ type="messages",
98
  )
99
 
100
  # with gr.Tab("Resume (HTML)"):
 
102
  # html_raw = f.read()
103
  # resume_html = gr.HTML(html_raw)
104
 
105
+ # with gr.Tab("Resume (PDF)"):
106
+ # md = gr.Markdown("[Link to PDF](https://huggingface.co/spaces/jerpint/talk-to-resume/resolve/main/resume.pdf)")
107
 
108
  md = gr.Markdown("Created by [Jeremy Pinto](https://www.jerpint.io)")
109