Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
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="
|
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__":
|