suvadityamuk commited on
Commit
d2d1ae8
·
1 Parent(s): 7394cfa

chore: update app.py

Browse files

Signed-off-by: Suvaditya Mukherjee <[email protected]>

Files changed (2) hide show
  1. README.md +4 -1
  2. app.py +13 -2
README.md CHANGED
@@ -10,4 +10,7 @@ pinned: false
10
  license: apache-2.0
11
  ---
12
 
13
- A chatbot that helps you ask questions about Suvaditya!
 
 
 
 
10
  license: apache-2.0
11
  ---
12
 
13
+ A chatbot that helps you ask questions about Suvaditya!
14
+
15
+ Note: Sometimes, as always, the LLM may give wrong answers. Here's a link to my resume, if you'd like to go through it yourself!
16
+ Get in touch with me through [X](https://x.com/halcyonrayes), [Gmail](mailto:[email protected]), [LinkedIn](https://www.linkedin.com/in/suvadityamukherjee), or [schedule a meeting with me here](https://cal.com/suvadityamuk)
app.py CHANGED
@@ -99,6 +99,7 @@ def update_chat_history(chat_history, tool_query, query_results):
99
 
100
  if __name__ == "__main__":
101
  RESUME_DATA = """
 
102
  Suvaditya Mukherjee Email: [email protected]
103
  Portfolio: suvadityamuk.com Mobile: (213) 827-9733
104
  Github: github.com/suvadityamuk
@@ -278,6 +279,15 @@ if __name__ == "__main__":
278
 
279
  @spaces.GPU
280
  def rag_process(message, chat_history):
 
 
 
 
 
 
 
 
 
281
  # wandb.init(
282
  # project="resume-rag",
283
  # name="zerogpu-run",
@@ -355,8 +365,9 @@ if __name__ == "__main__":
355
  title="Suvaditya's Personal RAG, a space on ZeroGPU!",
356
  examples=["Where did Suvaditya complete his Bachelor's Degree?", "Where is Suvaditya currently working?"],
357
  description="Ask any question about Suvaditya's resume and get an answer!",
358
- theme="John6666/YntecDark"
 
359
  )
360
- demo.launch()
361
 
362
  # wandb.finish()
 
99
 
100
  if __name__ == "__main__":
101
  RESUME_DATA = """
102
+
103
  Suvaditya Mukherjee Email: [email protected]
104
  Portfolio: suvadityamuk.com Mobile: (213) 827-9733
105
  Github: github.com/suvadityamuk
 
279
 
280
  @spaces.GPU
281
  def rag_process(message, chat_history):
282
+ if not chat_history:
283
+ system_message = {
284
+ "role": "system",
285
+ "content": """You are an AI assistant focused on answering questions about Suvaditya's resume.
286
+ Only provide information that is explicitly mentioned in the resume data.
287
+ If you're unsure about any information, refuse to answer and direct users to suvadityamuk.com.
288
+ Be accurate and concise in your responses. """
289
+ }
290
+ chat_history = [system_message]
291
  # wandb.init(
292
  # project="resume-rag",
293
  # name="zerogpu-run",
 
365
  title="Suvaditya's Personal RAG, a space on ZeroGPU!",
366
  examples=["Where did Suvaditya complete his Bachelor's Degree?", "Where is Suvaditya currently working?"],
367
  description="Ask any question about Suvaditya's resume and get an answer!",
368
+ theme="John6666/YntecDark",
369
+ save_history=True
370
  )
371
+ demo.launch()
372
 
373
  # wandb.finish()