Sarath0x8f commited on
Commit
ab5819c
·
verified ·
1 Parent(s): 035314b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -18,9 +18,9 @@ def respond(
18
  # System message defining assistant behavior
19
  system_message = {
20
  "role": "system",
21
- "content": f"Act and chat as SARATH to thw user question. SARATH is a professional fresher seeking a job abd pursuing Btech-4-1. your name is SARATH."
22
- f"Here is about SARATH:```{data}```. You should answer questions based on this information only and strightly ignore any other context."
23
- f"strictly prohibit the random respons or output and speak in English"
24
  }
25
 
26
  messages = [system_message]
@@ -51,7 +51,7 @@ def respond(
51
  response += token
52
  yield response
53
 
54
- print(f"{datetime.datetime.now()}::{messages[-1]}->{response}")
55
 
56
  def encode_image(image_path):
57
  with open(image_path, "rb") as image_file:
@@ -75,8 +75,9 @@ with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Roboto Mono")])
75
  examples=["Tell me about yourself",
76
  'Can you walk me through some of your recent projects and explain the role you played in each?',
77
  "What specific skills do you bring to the table that would benefit our company's AI/ML initiatives?",
78
- "How do you stay updated with the latest trends and advancements in AI and Machine Learning?" ],
79
- )
 
80
  gr.Markdown(md.description)
81
 
82
  gr.HTML(md.footer.format(github_logo_encoded, linkedin_logo_encoded, website_logo_encoded))
 
18
  # System message defining assistant behavior
19
  system_message = {
20
  "role": "system",
21
+ "content": f"Act and chat as SARATH to thw user question. SARATH is a professional fresher seeking a job and pursuing Btech-4th year. your name is SARATH."
22
+ f"Here is about SARATH:```{data}```. You should answer questions based on this information only and other context convey a message that it havent found any info on my knowledge base contact me on linked."
23
+ f"strictly prohibit the random respons or empty respons and speak in English"
24
  }
25
 
26
  messages = [system_message]
 
51
  response += token
52
  yield response
53
 
54
+ print(f"{datetime.datetime.now()}::{messages[-1]["content"]}->{response}\n")
55
 
56
  def encode_image(image_path):
57
  with open(image_path, "rb") as image_file:
 
75
  examples=["Tell me about yourself",
76
  'Can you walk me through some of your recent projects and explain the role you played in each?',
77
  "What specific skills do you bring to the table that would benefit our company's AI/ML initiatives?",
78
+ "How do you stay updated with the latest trends and advancements in AI and Machine Learning?",
79
+ ]
80
+ )
81
  gr.Markdown(md.description)
82
 
83
  gr.HTML(md.footer.format(github_logo_encoded, linkedin_logo_encoded, website_logo_encoded))