AI_lawer / app.py
Bullet500's picture
Update app.py
fd32b2d verified
raw
history blame contribute delete
818 Bytes
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)