File size: 818 Bytes
d628ada
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from langchain_groq import ChatGroq
import streamlit as st

from langchain.prompts import PromptTemplate

st.title('AI LAWYER')#TITLE
st.subheader("HERE YOU WILL FIND SOLUTION FOR YOUR CHARGES")


LLM=ChatGroq(temperature=0.4,
             groq_api_key='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')#GEN AI MODEL

A=st.text_input('ENTER YOUR CHARGES')

SUB=st.button('SUBMIT')#BUTTON

B=PromptTemplate(input=['C'],
                 template="""you are a lawyer, working in high court for 40 years,
                   you know every laws and solutions for it according to indian constitution,
                     now tell me what is this {C} charges in simple 30 words
                       and how can i withdraw this charges.""")

if SUB:
    D=B.format(C=A)
    E=LLM.invoke(D)
    st.write(E.content)