Add data model image to loader page

This commit is contained in:
Oskar Hane
2023-09-28 17:18:24 +02:00
parent c2cf59e8c8
commit 075680b067
5 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
*
!*.py
!requirements.txt
!images/*

BIN
images/datamodel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -1,4 +1,3 @@
# TODO Langchain base image
FROM python:latest
WORKDIR /app
@@ -13,9 +12,9 @@ COPY requirements.txt .
RUN pip install --upgrade -r requirements.txt
# COPY .env .
COPY loader.py .
COPY utils.py .
COPY images ./images
EXPOSE 8502

View File

@@ -5,6 +5,7 @@ from langchain.graphs import Neo4jGraph
import streamlit as st
from streamlit.logger import get_logger
from utils import load_embedding_model
from PIL import Image
load_dotenv(".env")
@@ -142,9 +143,10 @@ def get_pages():
def render_page():
datamodel_image = Image.open("./images/datamodel.png")
st.header("StackOverflow Loader")
st.subheader("Choose StackOverflow tags to load into Neo4j")
st.caption("Go to http://localhost:7474/browser/ to explore the graph.")
st.caption("Go to http://localhost:7474/ to explore the graph.")
user_input = get_tag()
num_pages, start_page = get_pages()
@@ -155,6 +157,9 @@ def render_page():
for page in range(1, num_pages + 1):
load_so_data(user_input, start_page + (page - 1))
st.success("Import successful", icon="")
st.caption("Data model")
st.image(datamodel_image)
st.caption("Go to http://localhost:7474/ to interact with the database")
except Exception as e:
st.error(f"Error: {e}", icon="🚨")
with st.expander("Highly ranked questions rather than tags?"):

View File

@@ -6,3 +6,4 @@ tiktoken
neo4j
streamlit
sentence_transformers
Pillow