Spaces:
Build error
Build error
Create app.py
Browse files1234567891011121314151617181920212223242526from langchain_groq import ChatGroqimport streamlit as st
from langchain.prompts import PromptTemplate
st.title('AI LAWYER')#TITLEst.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)app.pyAdded+26