Update my_model/utilities/st_utils.py
Browse files
my_model/utilities/st_utils.py
CHANGED
@@ -1,5 +1,34 @@
|
|
1 |
import streamlit as st
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
class StateManager:
|
5 |
def __init__(self):
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
class UIManager:
|
4 |
+
def __init__(self, state_manager):
|
5 |
+
self.state_manager = state_manager
|
6 |
+
|
7 |
+
def display_sidebar_navigation(self):
|
8 |
+
st.sidebar.title("Navigation")
|
9 |
+
return st.sidebar.radio("Go to", ["Home", "Dataset Analysis", "Evaluation Results", "Run Inference", "Dissertation Report"])
|
10 |
+
|
11 |
+
def display_home_page(self):
|
12 |
+
st.title("MultiModal Learning for Knowledge-Based Visual Question Answering")
|
13 |
+
st.write("Home page content goes here...")
|
14 |
+
|
15 |
+
def display_dissertation_report(self):
|
16 |
+
st.title("Dissertation Report")
|
17 |
+
st.write("Click the link below to view the PDF.")
|
18 |
+
with open("Files/Dissertation Report.pdf", "rb") as file:
|
19 |
+
st.download_button(label="Download PDF", data=file, file_name="Dissertation_Report.pdf", mime="application/octet-stream")
|
20 |
+
|
21 |
+
def display_evaluation_results(self):
|
22 |
+
st.title("Evaluation Results")
|
23 |
+
st.write("This is a Place Holder until the contents are uploaded.")
|
24 |
+
|
25 |
+
def display_dataset_analysis(self):
|
26 |
+
st.title("OK-VQA Dataset Analysis")
|
27 |
+
st.write("This is a Place Holder until the contents are uploaded.")
|
28 |
+
|
29 |
+
|
30 |
+
|
31 |
+
|
32 |
|
33 |
class StateManager:
|
34 |
def __init__(self):
|