Added sidebar
Browse files
app.py
CHANGED
@@ -1,4 +1,41 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
st.set_page_config(layout="wide")
|
4 |
+
|
5 |
+
with st.sidebar:
|
6 |
+
st.title('Document Summarization and QA System')
|
7 |
+
st.markdown('''
|
8 |
+
## About this application
|
9 |
+
Upload a pdf to ask questions about it. This retrieval-augmented generation (RAG) workflow uses:
|
10 |
+
- [Streamlit](https://streamlit.io/)
|
11 |
+
- [LlamaIndex](https://docs.llamaindex.ai/en/stable/)
|
12 |
+
- [OpenAI](https://platform.openai.com/docs/models)
|
13 |
+
''')
|
14 |
+
|
15 |
+
st.write('Made by ***Nate Mahynski***')
|
16 |
+
st.write('nathan.mahynski@nist.gov')
|
17 |
+
|
18 |
+
# Select Provider
|
19 |
+
provider = st.selectbox(
|
20 |
+
label="Select LLM Provider",
|
21 |
+
options=['openai', 'huggingface'],
|
22 |
+
index=0
|
23 |
+
)
|
24 |
+
|
25 |
+
# Select LLM
|
26 |
+
if provider == 'openai':
|
27 |
+
llm_list = ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo', 'gpt-4o']
|
28 |
+
else:
|
29 |
+
llm_list = []
|
30 |
+
|
31 |
+
llm = st.selectbox(
|
32 |
+
label="Select LLM Model",
|
33 |
+
options=llm_list,
|
34 |
+
index=0
|
35 |
+
)
|
36 |
+
|
37 |
+
# Enter Token
|
38 |
+
token = st.text_input(
|
39 |
+
"Enter your token",
|
40 |
+
value=None
|
41 |
+
)
|