File size: 1,729 Bytes
da5916b
c782181
 
 
 
 
da5916b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bffe4e7
da5916b
 
bffe4e7
 
 
 
 
 
 
da5916b
 
 
 
bffe4e7
1ef58a6
da5916b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import os
import google.generativeai as genai
GOOGLE_API_KEY=os.getenv('GEMINI_API_KEY')
genai.configure(api_key=GOOGLE_API_KEY)
model = genai.GenerativeModel(model_name = "gemini-pro")


# Create a banner using Markdown
st.markdown(
    """
    <div style="min-width: 1000px;">
        <div style="background-color:#f63366;padding:10px;border-radius:10px;">
            <h1 style="color:white;text-align:center;">Red Octopus</h1>
        </div>
        <div style="color:black;text-align:center;">
            <h1>Welcome to the Proposition Management Tool</h1>
        </div>
    </div>
    """,
    unsafe_allow_html=True
)

selectedCity = st.selectbox("Please select the City and the Bank Product for Your Proposition.", ["CharlesTown", "Limburg"])
selectedProduct = st.selectbox("Please select the Product", ["Current", "Mortage", "Credit Card", "Crypto"])
userProposal = st.text_area("Enter your Proposition for Select City and Product")

submit_button = st.button("Submit")
pre_prompt = '''You are a business advisor person and you specialize in banking services.
We have two use cases of two separate banks CharlesTown and Limburg. Charles town is a bigger bank and can provide loans for huge companies while Limburg is a small
bank which provides personal loans and small business loans. CharlesTown has an interest rate of 3% while Limbur has it at 5%. You will get proposal for loan request and you will have to 
decide which bank suits them the best to provide loan for.

{{0}}
'''

if submit_button:
    st.write("You clicked the Submit button!")
    st.write("Entered text:", userProposal)
    response = model.generate_content([pre_prompt.format(userProposal)])
    st.write(response.text)