ARBAJSSHAIKH commited on
Commit
d628ada
·
verified ·
1 Parent(s): 6838c7f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain_groq import ChatGroq
2
+ import streamlit as st
3
+
4
+ from langchain.prompts import PromptTemplate
5
+
6
+ st.title('AI LAWYER')#TITLE
7
+ st.subheader("HERE YOU WILL FIND SOLUTION FOR YOUR CHARGES")
8
+
9
+
10
+ LLM=ChatGroq(temperature=0.4,
11
+ groq_api_key='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')#GEN AI MODEL
12
+
13
+ A=st.text_input('ENTER YOUR CHARGES')
14
+
15
+ SUB=st.button('SUBMIT')#BUTTON
16
+
17
+ B=PromptTemplate(input=['C'],
18
+ template="""you are a lawyer, working in high court for 40 years,
19
+ you know every laws and solutions for it according to indian constitution,
20
+ now tell me what is this {C} charges in simple 30 words
21
+ and how can i withdraw this charges.""")
22
+
23
+ if SUB:
24
+ D=B.format(C=A)
25
+ E=LLM.invoke(D)
26
+ st.write(E.content)