Update app2.py
Browse files
app2.py
CHANGED
@@ -96,7 +96,7 @@ def get_document_based_response(prompt, document_content):
|
|
96 |
def get_ai_response(prompt: str) -> str:
|
97 |
"""Gets the AI response based on the given prompt."""
|
98 |
messages = [
|
99 |
-
{"role": "system", "content": "You are a helpful legal assistant
|
100 |
{"role": "user", "content": prompt}
|
101 |
]
|
102 |
try:
|
@@ -1503,6 +1503,13 @@ def generate_legal_brief(case_info):
|
|
1503 |
6. An analysis of why the winning party won
|
1504 |
7. A review of how the losing party could have potentially won
|
1505 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1506 |
Case Information (Part {i+1}/{len(chunks)}):
|
1507 |
{chunk}
|
1508 |
|
@@ -1523,7 +1530,7 @@ def generate_legal_brief(case_info):
|
|
1523 |
|
1524 |
def automated_legal_brief_generation_ui():
|
1525 |
st.title("Automated Legal Brief Generation")
|
1526 |
-
|
1527 |
if 'legal_brief' not in st.session_state:
|
1528 |
st.session_state.legal_brief = ""
|
1529 |
|
|
|
96 |
def get_ai_response(prompt: str) -> str:
|
97 |
"""Gets the AI response based on the given prompt."""
|
98 |
messages = [
|
99 |
+
{"role": "system", "content": "You are a helpful legal assistant LexAI which has all the legal information in the world and is the the best assitand for lawyers, lawfirms and a common citizen, answer the question based on the US law but if the question lies out of the context of us law then answer it too saying i am LexAI and advanced legal assistant but this is what i know about the topic you are asking"},
|
100 |
{"role": "user", "content": prompt}
|
101 |
]
|
102 |
try:
|
|
|
1503 |
6. An analysis of why the winning party won
|
1504 |
7. A review of how the losing party could have potentially won
|
1505 |
|
1506 |
+
And if the user has just provided the case information or details of an case which has not been presented in the court or its outcome(result) is yet to come then generate:
|
1507 |
+
1. A summary of the facts and the case details.
|
1508 |
+
2. How the user can win this case based on the provided information.
|
1509 |
+
3. Key areas where user should be carefull and could potentially loose this case.
|
1510 |
+
4. Relevant Arguments for this case to be provided in the court.
|
1511 |
+
5. predict wheter user can win this case or not.
|
1512 |
+
|
1513 |
Case Information (Part {i+1}/{len(chunks)}):
|
1514 |
{chunk}
|
1515 |
|
|
|
1530 |
|
1531 |
def automated_legal_brief_generation_ui():
|
1532 |
st.title("Automated Legal Brief Generation")
|
1533 |
+
st.subheader("enter the caase details to generate a legal brief or to generate legal brief or predict the case outcome and how the case should proceed")
|
1534 |
if 'legal_brief' not in st.session_state:
|
1535 |
st.session_state.legal_brief = ""
|
1536 |
|