mahynski commited on
Commit
424b9ad
·
1 Parent(s): 98abcf8

restructured

Browse files
Files changed (1) hide show
  1. app.py +49 -49
app.py CHANGED
@@ -4,55 +4,55 @@ from streamlit_pdf_viewer import pdf_viewer
4
 
5
  st.set_page_config(layout="wide")
6
 
7
- def main():
8
- with st.sidebar:
9
- st.title('Document Summarization and QA System')
10
- # st.markdown('''
11
- # ## About this application
12
- # Upload a pdf to ask questions about it. This retrieval-augmented generation (RAG) workflow uses:
13
- # - [Streamlit](https://streamlit.io/)
14
- # - [LlamaIndex](https://docs.llamaindex.ai/en/stable/)
15
- # - [OpenAI](https://platform.openai.com/docs/models)
16
- # ''')
17
-
18
- # st.write('Made by ***Nate Mahynski***')
19
- # st.write('nathan.mahynski@nist.gov')
20
-
21
- # Select Provider
22
- provider = st.selectbox(
23
- label="Select LLM Provider",
24
- options=['openai', 'huggingface'],
25
- index=0
26
- )
27
-
28
- # Select LLM
29
- if provider == 'openai':
30
- llm_list = ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo', 'gpt-4o']
31
- else:
32
- llm_list = []
33
-
34
- llm = st.selectbox(
35
- label="Select LLM Model",
36
- options=llm_list,
37
- index=0
38
- )
39
-
40
- # Enter Token
41
- token = st.text_input(
42
- "Enter your token",
43
- value=None
44
- )
45
-
46
- uploaded_file = st.file_uploader(
47
- "Choose a PDF file to upload",
48
- type=['pdf'],
49
- accept_multiple_files=False
50
- )
51
-
52
- if uploaded_file is not None:
53
- # Parse the file
54
- pass
55
-
56
  col1, col2 = st.columns(2)
57
 
58
  with col2:
 
4
 
5
  st.set_page_config(layout="wide")
6
 
7
+ with st.sidebar:
8
+ st.title('Document Summarization and QA System')
9
+ # st.markdown('''
10
+ # ## About this application
11
+ # Upload a pdf to ask questions about it. This retrieval-augmented generation (RAG) workflow uses:
12
+ # - [Streamlit](https://streamlit.io/)
13
+ # - [LlamaIndex](https://docs.llamaindex.ai/en/stable/)
14
+ # - [OpenAI](https://platform.openai.com/docs/models)
15
+ # ''')
16
+
17
+ # st.write('Made by ***Nate Mahynski***')
18
+ # st.write('nathan.mahynski@nist.gov')
19
+
20
+ # Select Provider
21
+ provider = st.selectbox(
22
+ label="Select LLM Provider",
23
+ options=['openai', 'huggingface'],
24
+ index=0
25
+ )
26
+
27
+ # Select LLM
28
+ if provider == 'openai':
29
+ llm_list = ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo', 'gpt-4o']
30
+ else:
31
+ llm_list = []
32
+
33
+ llm = st.selectbox(
34
+ label="Select LLM Model",
35
+ options=llm_list,
36
+ index=0
37
+ )
38
+
39
+ # Enter Token
40
+ token = st.text_input(
41
+ "Enter your token",
42
+ value=None
43
+ )
44
+
45
+ uploaded_file = st.file_uploader(
46
+ "Choose a PDF file to upload",
47
+ type=['pdf'],
48
+ accept_multiple_files=False
49
+ )
50
+
51
+ if uploaded_file is not None:
52
+ # Parse the file
53
+ pass
54
+
55
+ def main()
56
  col1, col2 = st.columns(2)
57
 
58
  with col2: