Skip to content

Commit

Permalink
Doddi Priyambodo is committing at 2023-12-24 14:17:13
Browse files Browse the repository at this point in the history
  • Loading branch information
doddipriyambodo committed Dec 24, 2023
1 parent af6a0af commit 6a3157a
Show file tree
Hide file tree
Showing 17 changed files with 4,087 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
def run():
st.set_page_config(page_icon="image/usd.ico")
st.markdown(vNoLabel, unsafe_allow_html=True)
st.write("# πŸ’° IamRich - Your Smart Personal Financial Advisor application (v3)")
st.write("# πŸ’° IamRich - Your Smart Personal Financial Advisor application (v3.0)")
st.subheader("//IamRich is powered by Google Cloud Generative AI!")
st.write(html_code)

Expand Down Expand Up @@ -50,7 +50,7 @@ def run():
st.markdown(
"""
This application is maintained by <b>Doddi Priyambodo</b> (priyambodo@google.com | doddi@bicarait.com)
App Name & latest Version: <b>IamRich-v3.0.0</b>
App Name & latest Version: <b>IamRich-v3.0</b>
""", unsafe_allow_html=True
)

Expand Down
24 changes: 24 additions & 0 deletions iamrich.priyambodo.com-v3.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Base image with Python and Poetry pre-installed
FROM python:3.11 AS base

# Install Poetry
RUN pip install poetry

# Set working directory
WORKDIR /app

# Copy project files
COPY pyproject.toml poetry.lock ./

# Install dependencies using Poetry
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi

# Copy application code
COPY . .

# Expose port for Streamlit
EXPOSE 8080

# Set entrypoint to start Streamlit
ENTRYPOINT ["streamlit", "run", "0_πŸ’°_IamRich_Financial_Advisor_v3.py", "--server.port=8080", "--server.address=0.0.0.0"]
24 changes: 24 additions & 0 deletions iamrich.priyambodo.com-v3.0/Dockerfile-using_poetry
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Base image with Python and Poetry pre-installed
FROM python:3.11 AS base

# Install Poetry
RUN pip install poetry

# Set working directory
WORKDIR /app

# Copy project files
COPY pyproject.toml poetry.lock ./

# Install dependencies using Poetry
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi

# Copy application code
COPY . .

# Expose port for Streamlit
EXPOSE 8080

# Set entrypoint to start Streamlit
ENTRYPOINT ["streamlit", "run", "0_πŸ’°_IamRich_Financial_Advisor_v3.py", "--server.port=8080", "--server.address=0.0.0.0"]
6 changes: 6 additions & 0 deletions iamrich.priyambodo.com-v3.0/Dockerfile-using_requirementstxt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.8
EXPOSE 8080
WORKDIR /app
COPY . ./
RUN pip install -r requirements.txt
ENTRYPOINT ["streamlit", "run", "0_πŸ’°_IamRich_Financial_Advisor_v3.py", "--server.port=8080", "--server.address=0.0.0.0"]
6 changes: 3 additions & 3 deletions iamrich.priyambodo.com-v3.0/call_gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path as p
from pprint import pprint
import pandas as pd
from pydantic import BaseModel
#from pydantic import BaseModel

# Langchain
import langchain
Expand Down Expand Up @@ -38,7 +38,7 @@
# Vertex AI
print(f"Vertex AI SDK version: {aiplatform.__version__}")

# # LLM model using LangChain
## LLM model using LangChain
# llm = VertexAI(
# model_name="text-bison@001",
# max_output_tokens=256,
Expand All @@ -48,7 +48,7 @@
# verbose=True,
# )

# # Chat
## Chat
# chat = ChatVertexAI()

# Not using LangChain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import streamlit as st
import call_gemini as genai

st.header("Discover the financial detail and information of a Company or Stock to invest", divider="rainbow")
#st.header("Discover the financial detail and information of a Company or Stock to invest", divider="rainbow")
st.header("Discover the financial detail and information of a Company or Stock to invest")

st.write("Powered by Google Gemini Large Language Model to explore and research for the financial information")
st.subheader("Please enter your company name or stock symbol.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#Import the required Libraries
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt
from typing import List
from typing import Any
from google.cloud import discoveryengine
import json
import webbrowser
import os

# Defining variables for the project
project_id = "work-mylab-machinelearning"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,14 @@ def clear_all():

@st.cache_data(show_spinner=False)

def submit_question():
def submit_question(): #the main function
engine = get_sql_engine(source_dataset_selected)
db = get_sql_db(engine, [table_selected])
db_chain = get_db_chain(llm, db)

t0 = time.time()
final_prompt = GOOGLESQL_PROMPT.format(input=prompt_question, table_info=table_selected, top_k=2000000)
print(final_prompt)

# result = db_chain.run(final_prompt)
result = db_chain(final_prompt)
Expand Down Expand Up @@ -182,7 +183,8 @@ def submit_question():
st.warning(f"Sorry there are no Vizualisations available for this result")

except Exception as e:
st.error(f"An Error Occurred. Check you're using the correct table!")
#st.error(f"An Error Occurred. Check you're using the correct table!")
st.error()

# with tab3:
# st.subheader("LLM's and Langchain")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import streamlit as st
import call_gemini as genai

st.header("Create a Marketing Campaign and a Story", divider="rainbow")
#st.header("Create a Marketing Campaign and a Story", divider="rainbow")
st.header("Create a Marketing Campaign and a Story")
st.write("Using Gemini Pro, Google Large Language Model ")

#tab1, tab2, tab3, tab4 = st.tabs(["Generate story","Marketing campaign", "Image Playground", "Video Playground"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"""
with st.sidebar:
st.success("Choose the menu that you would like to explore above πŸ‘†")
st.info("app version: IamRich v3.0.0-STABLE")
st.info("app version: IamRich v3.0-STABLE")
st.image("image/doddihead.png", width=200)
st.error("This application is created and maintained by Doddi Priyambodo")

Expand Down
Loading

0 comments on commit 6a3157a

Please sign in to comment.