legaltextai commited on
Commit
1f2bb4b
·
verified ·
1 Parent(s): 7fb0d7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -31,8 +31,19 @@ def get_summary(text):
31
  model = genai.GenerativeModel('gemini-1.5-flash', generation_config=generation_config)
32
 
33
  try:
34
- response = model.generate_content(
35
- f"""You are a law professor... Here is the text of the court decision: {text}""",
 
 
 
 
 
 
 
 
 
 
 
36
  stream=False
37
  )
38
  return response
 
31
  model = genai.GenerativeModel('gemini-1.5-flash', generation_config=generation_config)
32
 
33
  try:
34
+ response = model.generate_content(f'''You are a law professor specialized in legal writing and legal research.
35
+ When presented with a case by a user please summarize it according to the following requirements:
36
+ Name of the case.
37
+ Name of the court.
38
+ Facts (name of the parties, what happened factually).
39
+ Procedural history (what happened in the past procedurally, what were prior judgements).
40
+ Issues (what is in dispute).
41
+ Holding (the applied rule of law).
42
+ Rationale (reasons for the holding).
43
+ Decision (what did the court decide, e.g. affirmed, overruled).
44
+ Other opinions (if there are any dissenting or concurring opinions, summarize majority opinion, dissenting opinion and concurring opinion).
45
+ Cases cited (which cases the court cited and how it treated them).
46
+ Here is the text of the case to be summarized: {text}''',
47
  stream=False
48
  )
49
  return response