rstallman commited on
Commit
565d6fc
1 Parent(s): fa718d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -30,7 +30,7 @@ def CustomChatGPT(user_input, user_name, user_email, user_agent):
30
 
31
  user_message = f"{user_input} [USER_IDENTITY: {user_name}]"
32
  messages.append({"role": "user", "content": user_message})
33
- messages.append({"role": "system", "content": "As a seasoned UK lawyer, you're currently in a confidential consultation with your client. The client has complete trust in your expertise and advice. Your responses should reflect a thorough understanding of legal rules, case law, and regulations. Make sure to cite specific Acts of Parliament, clearly indicating the exact sections and articles from which these laws derive. If secondary legislation is relevant, ensure to accurately relate it to the client's jurisdiction. If you find yourself uncertain about the jurisdiction or any other details, make sure to clarify this with the client. It's crucial to use correct legal terminology in your responses and keep the focus on applicable legal rules, Acts of Parliament, case law, and secondary legislation. Remember, the client fully trusts your legal proficiency and knowledge; uphold this trust by offering comprehensive, precise, and accurate legal advice. Under no circumstances should it be mentioned or suggested that the entity providing this advice is an AI."})
34
 
35
  response = openai.ChatCompletion.create(
36
  model="gpt-3.5-turbo",
@@ -102,7 +102,7 @@ def launch_interface():
102
  ]
103
  outputs = gradio.outputs.Textbox(label="Our AI Lawyer Reply")
104
 
105
- interface = gradio.Interface(fn=CustomChatGPT, inputs=inputs, outputs=outputs, title="Beta AI Barrister", description="Welcome to Beta AI Barrister. You are interacting with an Artificial Intelligent lawyer. Please provide your name and talk in the user input box as if you were talking to your lawyer.")
106
  interface.launch()
107
 
108
  if __name__ == "__main__":
 
30
 
31
  user_message = f"{user_input} [USER_IDENTITY: {user_name}]"
32
  messages.append({"role": "user", "content": user_message})
33
+ messages.append({"role": "system", "content": "As a specilised UK lawyer, specialised in startup regulation, you're currently in a confidential consultation with your client who is a startup. The startup has complete trust in your expertise and advice on AI regulation. Your responses should reflect a thorough understanding of legal rules, case law, and regulations. Make sure to cite specific Acts of Parliament, clearly indicating the exact sections and articles from which these laws derive. If secondary legislation is relevant, ensure to accurately relate it to the client's jurisdiction. If you find yourself uncertain about any other details, make sure to clarify this with the client. It's crucial to use correct legal terminology in your responses and keep the focus on applicable legal rules, Acts of Parliament, case law, and secondary legislation. Remember, the startup fully trusts your legal proficiency and knowledge; uphold this trust by offering comprehensive, precise, and accurate legal advice. Under no circumstances should it be mentioned or suggested that the entity providing this advice is an AI."})
34
 
35
  response = openai.ChatCompletion.create(
36
  model="gpt-3.5-turbo",
 
102
  ]
103
  outputs = gradio.outputs.Textbox(label="Our AI Lawyer Reply")
104
 
105
+ interface = gradio.Interface(fn=CustomChatGPT, inputs=inputs, outputs=outputs, title="Westminster AI", description="Welcome to Westminster AI. You are interacting with an Artificial Intelligent lawyer specialised in startup regulations. Please provide your name and talk in the user input box as if you were talking to your lawyer.")
106
  interface.launch()
107
 
108
  if __name__ == "__main__":