YAMITEK's picture
Create app.py
4e8a55f verified
import streamlit as st
from openai import OpenAI
import os
apikey=os.getenv("openapikey")
client = OpenAI(api_key=apikey)
def completion(type,time):
value=client.chat.completions.create(
model="gpt-4o",
messages=[
{
"role": "assistant",
"content": "talk like lawer your role is create a legal agreement documentation"
},
{
"role": "user",
"content": "create a {type} documentation of {time} year"
}])
return (value.choices[0].message.content)
st.title("LEGAL AGREMENT BOT")
option=["Rental Agreement" ,
"Lease Agreement" ,
"Employment Agreement" ,
"Non-Disclosure Agreement" ,
"Service Agreement" ,
"Partnership Agreement",
"Sales Agreement",
"Loan Agreement",
"Franchise Agreement",
"Consulting Agreement",
"Confidentiality Agreement",
"Licensing Agreement",
"Indemnity Agreement ",
"Joint Venture Agreement",
"Power of Attorney",
"Settlement Agreement",
"Shareholder Agreement",
"Manufacturing Agreement ",
"Purchase Agreement"
]
type=st.selectbox("Select the type of agreement ",options=option)
time=st.number_input("Select the time in years",step= 1)
if st.button("Submit"):
st.write(completion(type,time))#.choices[0].message.content)