| from langchain_groq import ChatGroq |
| import streamlit as st |
|
|
| from langchain.prompts import PromptTemplate |
|
|
| st.title('AI LAWYER') |
| st.subheader("HERE YOU WILL FIND SOLUTION FOR YOUR CHARGES") |
|
|
|
|
| LLM=ChatGroq(temperature=0.4, |
| groq_api_key='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') |
|
|
| A=st.text_input('ENTER YOUR CHARGES') |
|
|
| SUB=st.button('SUBMIT') |
|
|
| 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) |