Johan713 commited on
Commit
d4b39ae
·
verified ·
1 Parent(s): 4676bbd

Update app2.py

Browse files
Files changed (1) hide show
  1. app2.py +58 -51
app2.py CHANGED
@@ -1406,6 +1406,9 @@ class LegalDataRetriever:
1406
 
1407
  def case_info_retriever():
1408
  st.subheader("Case Information Retriever")
 
 
 
1409
  query = st.text_input("Enter case name, number, or any relevant information:")
1410
  if st.button("Retrieve Case Information"):
1411
  with st.spinner("Retrieving case information..."):
@@ -1526,7 +1529,7 @@ def generate_legal_brief(case_info):
1526
  return full_brief
1527
 
1528
  def automated_legal_brief_generation_ui():
1529
- st.title("Automated Legal Brief Generation")
1530
  with st.expander("How to use"):
1531
  st.write('''Enter the case details and based on that it will generate a legal brief and also provide you with the proper analysis of the case and how you can win this case and where you have to be carefull''')
1532
  if 'legal_brief' not in st.session_state:
@@ -1588,56 +1591,56 @@ STATES = [
1588
  ]
1589
 
1590
  CITIES_BY_STATE = {
1591
- "Alabama": ["Birmingham", "Montgomery", "Mobile", "Huntsville"],
1592
- "Alaska": ["Anchorage", "Fairbanks", "Juneau"],
1593
- "Arizona": ["Phoenix", "Tucson", "Mesa", "Chandler"],
1594
- "Arkansas": ["Little Rock", "Fort Smith", "Fayetteville"],
1595
- "California": ["Los Angeles", "San Francisco", "San Diego", "San Jose"],
1596
- "Colorado": ["Denver", "Colorado Springs", "Aurora", "Fort Collins"],
1597
- "Connecticut": ["Bridgeport", "New Haven", "Hartford", "Stamford"],
1598
- "Delaware": ["Wilmington", "Dover", "Newark"],
1599
- "Florida": ["Miami", "Orlando", "Jacksonville", "Tampa"],
1600
- "Georgia": ["Atlanta", "Augusta", "Columbus", "Savannah"],
1601
- "Hawaii": ["Honolulu", "Hilo", "Kailua"],
1602
- "Idaho": ["Boise", "Nampa", "Meridian"],
1603
- "Illinois": ["Chicago", "Aurora", "Rockford", "Joliet"],
1604
- "Indiana": ["Indianapolis", "Fort Wayne", "Evansville"],
1605
- "Iowa": ["Des Moines", "Cedar Rapids", "Davenport"],
1606
- "Kansas": ["Wichita", "Overland Park", "Kansas City"],
1607
- "Kentucky": ["Louisville", "Lexington", "Bowling Green"],
1608
- "Louisiana": ["New Orleans", "Baton Rouge", "Shreveport"],
1609
- "Maine": ["Portland", "Lewiston", "Bangor"],
1610
- "Maryland": ["Baltimore", "Columbia", "Annapolis"],
1611
- "Massachusetts": ["Boston", "Worcester", "Springfield"],
1612
- "Michigan": ["Detroit", "Grand Rapids", "Ann Arbor"],
1613
- "Minnesota": ["Minneapolis", "St. Paul", "Rochester"],
1614
- "Mississippi": ["Jackson", "Gulfport", "Southaven"],
1615
- "Missouri": ["Kansas City", "St. Louis", "Springfield"],
1616
- "Montana": ["Billings", "Missoula", "Great Falls"],
1617
- "Nebraska": ["Omaha", "Lincoln", "Bellevue"],
1618
- "Nevada": ["Las Vegas", "Reno", "Henderson"],
1619
- "New Hampshire": ["Manchester", "Nashua", "Concord"],
1620
- "New Jersey": ["Newark", "Jersey City", "Paterson"],
1621
- "New Mexico": ["Albuquerque", "Las Cruces", "Santa Fe"],
1622
- "New York": ["New York City", "Buffalo", "Rochester", "Syracuse"],
1623
- "North Carolina": ["Charlotte", "Raleigh", "Greensboro"],
1624
- "North Dakota": ["Fargo", "Bismarck", "Grand Forks"],
1625
- "Ohio": ["Columbus", "Cleveland", "Cincinnati"],
1626
- "Oklahoma": ["Oklahoma City", "Tulsa", "Norman"],
1627
- "Oregon": ["Portland", "Eugene", "Salem"],
1628
- "Pennsylvania": ["Philadelphia", "Pittsburgh", "Allentown"],
1629
- "Rhode Island": ["Providence", "Warwick", "Cranston"],
1630
- "South Carolina": ["Charleston", "Columbia", "North Charleston"],
1631
- "South Dakota": ["Sioux Falls", "Rapid City", "Aberdeen"],
1632
- "Tennessee": ["Nashville", "Memphis", "Knoxville"],
1633
- "Texas": ["Houston", "Dallas", "Austin", "San Antonio"],
1634
- "Utah": ["Salt Lake City", "West Valley City", "Provo"],
1635
- "Vermont": ["Burlington", "South Burlington", "Rutland"],
1636
- "Virginia": ["Virginia Beach", "Norfolk", "Chesapeake"],
1637
- "Washington": ["Seattle", "Spokane", "Tacoma"],
1638
- "West Virginia": ["Charleston", "Huntington", "Morgantown"],
1639
- "Wisconsin": ["Milwaukee", "Madison", "Green Bay"],
1640
- "Wyoming": ["Cheyenne", "Casper", "Laramie"]
1641
  }
1642
 
1643
  def find_lawyers(state, city=None, practice_area=None, pages=1):
@@ -1945,6 +1948,10 @@ elif feature == "Document Analysis":
1945
 
1946
  elif feature == "Case Precedent Finder":
1947
  st.subheader("Case Precedent Finder")
 
 
 
 
1948
  if 'precedents' not in st.session_state:
1949
  st.session_state.precedents = None
1950
 
 
1406
 
1407
  def case_info_retriever():
1408
  st.subheader("Case Information Retriever")
1409
+ with st.expander("How to use"):
1410
+ st.write('''Enter the case details or case name and based on that it will find the cases similar to it.
1411
+ Keep the prompt as short as 5 words other wise it might show error in finding case''')
1412
  query = st.text_input("Enter case name, number, or any relevant information:")
1413
  if st.button("Retrieve Case Information"):
1414
  with st.spinner("Retrieving case information..."):
 
1529
  return full_brief
1530
 
1531
  def automated_legal_brief_generation_ui():
1532
+ st.subheader("Automated Legal Brief Generation")
1533
  with st.expander("How to use"):
1534
  st.write('''Enter the case details and based on that it will generate a legal brief and also provide you with the proper analysis of the case and how you can win this case and where you have to be carefull''')
1535
  if 'legal_brief' not in st.session_state:
 
1591
  ]
1592
 
1593
  CITIES_BY_STATE = {
1594
+ "Alabama": ["Birmingham", "Montgomery", "Mobile", "Huntsville", "Tuscaloosa", "Hoover", "Dothan", "Auburn", "Decatur", "Madison"],
1595
+ "Alaska": ["Anchorage", "Fairbanks", "Juneau", "Sitka", "Ketchikan", "Wasilla", "Kenai", "Kodiak", "Bethel", "Palmer"],
1596
+ "Arizona": ["Phoenix", "Tucson", "Mesa", "Chandler", "Scottsdale", "Glendale", "Gilbert", "Tempe", "Peoria", "Surprise"],
1597
+ "Arkansas": ["Little Rock", "Fort Smith", "Fayetteville", "Springdale", "Jonesboro", "North Little Rock", "Conway", "Rogers", "Pine Bluff", "Bentonville"],
1598
+ "California": ["Los Angeles", "San Diego", "San Jose", "San Francisco", "Fresno", "Sacramento", "Long Beach", "Oakland", "Bakersfield", "Anaheim"],
1599
+ "Colorado": ["Denver", "Colorado Springs", "Aurora", "Fort Collins", "Lakewood", "Thornton", "Arvada", "Westminster", "Pueblo", "Centennial"],
1600
+ "Connecticut": ["Bridgeport", "New Haven", "Hartford", "Stamford", "Waterbury", "Norwalk", "Danbury", "New Britain", "West Hartford", "Greenwich"],
1601
+ "Delaware": ["Wilmington", "Dover", "Newark", "Middletown", "Smyrna", "Milford", "Seaford", "Georgetown", "Elsmere", "New Castle"],
1602
+ "Florida": ["Jacksonville", "Miami", "Tampa", "Orlando", "St. Petersburg", "Hialeah", "Tallahassee", "Fort Lauderdale", "Port St. Lucie", "Cape Coral"],
1603
+ "Georgia": ["Atlanta", "Augusta", "Columbus", "Macon", "Savannah", "Athens", "Sandy Springs", "Roswell", "Johns Creek", "Albany"],
1604
+ "Hawaii": ["Honolulu", "East Honolulu", "Pearl City", "Hilo", "Kailua", "Waipahu", "Kaneohe", "Mililani Town", "Kahului", "Ewa Gentry"],
1605
+ "Idaho": ["Boise", "Meridian", "Nampa", "Idaho Falls", "Pocatello", "Caldwell", "Coeur d'Alene", "Twin Falls", "Lewiston", "Post Falls"],
1606
+ "Illinois": ["Chicago", "Aurora", "Joliet", "Naperville", "Rockford", "Elgin", "Springfield", "Peoria", "Champaign", "Waukegan"],
1607
+ "Indiana": ["Indianapolis", "Fort Wayne", "Evansville", "South Bend", "Carmel", "Bloomington", "Fishers", "Hammond", "Gary", "Lafayette"],
1608
+ "Iowa": ["Des Moines", "Cedar Rapids", "Davenport", "Sioux City", "Iowa City", "Waterloo", "Ames", "West Des Moines", "Council Bluffs", "Dubuque"],
1609
+ "Kansas": ["Wichita", "Overland Park", "Kansas City", "Olathe", "Topeka", "Lawrence", "Shawnee", "Manhattan", "Lenexa", "Salina"],
1610
+ "Kentucky": ["Louisville", "Lexington", "Bowling Green", "Owensboro", "Covington", "Richmond", "Georgetown", "Florence", "Hopkinsville", "Nicholasville"],
1611
+ "Louisiana": ["New Orleans", "Baton Rouge", "Shreveport", "Lafayette", "Lake Charles", "Kenner", "Bossier City", "Monroe", "Alexandria", "New Iberia"],
1612
+ "Maine": ["Portland", "Lewiston", "Bangor", "South Portland", "Auburn", "Biddeford", "Sanford", "Brunswick", "Augusta", "Saco"],
1613
+ "Maryland": ["Baltimore", "Columbia", "Germantown", "Silver Spring", "Waldorf", "Glen Burnie", "Frederick", "Ellicott City", "Dundalk", "Rockville"],
1614
+ "Massachusetts": ["Boston", "Worcester", "Springfield", "Cambridge", "Lowell", "Brockton", "Quincy", "Lynn", "New Bedford", "Fall River"],
1615
+ "Michigan": ["Detroit", "Grand Rapids", "Warren", "Sterling Heights", "Ann Arbor", "Lansing", "Flint", "Dearborn", "Livonia", "Westland"],
1616
+ "Minnesota": ["Minneapolis", "St. Paul", "Rochester", "Duluth", "Bloomington", "Brooklyn Park", "Plymouth", "St. Cloud", "Eagan", "Woodbury"],
1617
+ "Mississippi": ["Jackson", "Gulfport", "Southaven", "Hattiesburg", "Biloxi", "Meridian", "Tupelo", "Greenville", "Olive Branch", "Horn Lake"],
1618
+ "Missouri": ["Kansas City", "St. Louis", "Springfield", "Columbia", "Independence", "Lee's Summit", "O'Fallon", "St. Joseph", "St. Charles", "St. Peters"],
1619
+ "Montana": ["Billings", "Missoula", "Great Falls", "Bozeman", "Butte", "Helena", "Kalispell", "Havre", "Anaconda", "Miles City"],
1620
+ "Nebraska": ["Omaha", "Lincoln", "Bellevue", "Grand Island", "Kearney", "Fremont", "Hastings", "North Platte", "Norfolk", "Columbus"],
1621
+ "Nevada": ["Las Vegas", "Henderson", "Reno", "North Las Vegas", "Sparks", "Carson City", "Fernley", "Elko", "Mesquite", "Boulder City"],
1622
+ "New Hampshire": ["Manchester", "Nashua", "Concord", "Derry", "Dover", "Rochester", "Salem", "Merrimack", "Hudson", "Londonderry"],
1623
+ "New Jersey": ["Newark", "Jersey City", "Paterson", "Elizabeth", "Trenton", "Clifton", "Camden", "Passaic", "Union City", "Bayonne"],
1624
+ "New Mexico": ["Albuquerque", "Las Cruces", "Rio Rancho", "Santa Fe", "Roswell", "Farmington", "Clovis", "Hobbs", "Alamogordo", "Carlsbad"],
1625
+ "New York": ["New York City", "Buffalo", "Rochester", "Yonkers", "Syracuse", "Albany", "New Rochelle", "Mount Vernon", "Schenectady", "Utica"],
1626
+ "North Carolina": ["Charlotte", "Raleigh", "Greensboro", "Durham", "Winston-Salem", "Fayetteville", "Cary", "Wilmington", "High Point", "Concord"],
1627
+ "North Dakota": ["Fargo", "Bismarck", "Grand Forks", "Minot", "West Fargo", "Williston", "Dickinson", "Mandan", "Jamestown", "Wahpeton"],
1628
+ "Ohio": ["Columbus", "Cleveland", "Cincinnati", "Toledo", "Akron", "Dayton", "Parma", "Canton", "Youngstown", "Lorain"],
1629
+ "Oklahoma": ["Oklahoma City", "Tulsa", "Norman", "Broken Arrow", "Lawton", "Edmond", "Moore", "Midwest City", "Enid", "Stillwater"],
1630
+ "Oregon": ["Portland", "Salem", "Eugene", "Gresham", "Hillsboro", "Beaverton", "Bend", "Medford", "Springfield", "Corvallis"],
1631
+ "Pennsylvania": ["Philadelphia", "Pittsburgh", "Allentown", "Erie", "Reading", "Scranton", "Bethlehem", "Lancaster", "Harrisburg", "Altoona"],
1632
+ "Rhode Island": ["Providence", "Warwick", "Cranston", "Pawtucket", "East Providence", "Woonsocket", "Newport", "Central Falls", "Westerly", "North Providence"],
1633
+ "South Carolina": ["Charleston", "Columbia", "North Charleston", "Mount Pleasant", "Rock Hill", "Greenville", "Summerville", "Sumter", "Goose Creek", "Hilton Head Island"],
1634
+ "South Dakota": ["Sioux Falls", "Rapid City", "Aberdeen", "Brookings", "Watertown", "Mitchell", "Yankton", "Pierre", "Huron", "Vermillion"],
1635
+ "Tennessee": ["Nashville", "Memphis", "Knoxville", "Chattanooga", "Clarksville", "Murfreesboro", "Franklin", "Jackson", "Johnson City", "Bartlett"],
1636
+ "Texas": ["Houston", "San Antonio", "Dallas", "Austin", "Fort Worth", "El Paso", "Arlington", "Corpus Christi", "Plano", "Laredo"],
1637
+ "Utah": ["Salt Lake City", "West Valley City", "Provo", "West Jordan", "Orem", "Sandy", "Ogden", "St. George", "Layton", "Taylorsville"],
1638
+ "Vermont": ["Burlington", "South Burlington", "Rutland", "Barre", "Montpelier", "Winooski", "St. Albans", "Newport", "Vergennes", "Middlebury"],
1639
+ "Virginia": ["Virginia Beach", "Norfolk", "Chesapeake", "Richmond", "Newport News", "Alexandria", "Hampton", "Roanoke", "Portsmouth", "Suffolk"],
1640
+ "Washington": ["Seattle", "Spokane", "Tacoma", "Vancouver", "Bellevue", "Kent", "Everett", "Renton", "Yakima", "Federal Way"],
1641
+ "West Virginia": ["Charleston", "Huntington", "Morgantown", "Parkersburg", "Wheeling", "Weirton", "Fairmont", "Beckley", "Martinsburg", "Clarksburg"],
1642
+ "Wisconsin": ["Milwaukee", "Madison", "Green Bay", "Kenosha", "Racine", "Appleton", "Waukesha", "Oshkosh", "Eau Claire", "Janesville"],
1643
+ "Wyoming": ["Cheyenne", "Casper", "Laramie", "Gillette", "Rock Springs", "Sheridan", "Green River", "Evanston", "Riverton", "Jackson"]
1644
  }
1645
 
1646
  def find_lawyers(state, city=None, practice_area=None, pages=1):
 
1948
 
1949
  elif feature == "Case Precedent Finder":
1950
  st.subheader("Case Precedent Finder")
1951
+
1952
+ with st.expander("How to use"):
1953
+ st.write('''Enter the case details or case name and based on that it will find the cases similar to it.
1954
+ Keep the prompt as short as 5 words other wise it might show error in finding case''')
1955
  if 'precedents' not in st.session_state:
1956
  st.session_state.precedents = None
1957