your name commited on
Commit
0ba87c5
1 Parent(s): 3933a05
Files changed (2) hide show
  1. app.py +77 -11
  2. data.csv +101 -0
app.py CHANGED
@@ -6,7 +6,8 @@ import time
6
  from streamlit_option_menu import option_menu
7
 
8
  # Set Streamlit page configuration
9
- st.set_page_config(page_title='CSV Processing',
 
10
  page_icon=":memo:",
11
  layout='wide',
12
  initial_sidebar_state='collapsed')
@@ -41,8 +42,68 @@ with st.sidebar:
41
  selected = option_menu("Main Menu", ["Home", 'Help'],
42
  icons=['house', 'gear'], menu_icon="cast", default_index=0)
43
  selected
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
  if selected=="Help":
 
 
46
  # st.title("Help")
47
  # Import required libraries
48
  import streamlit as st
@@ -82,39 +143,44 @@ if selected=="Help":
82
  st.markdown("""
83
  ## Getting Started
84
 
85
- This project aims to ...
86
 
87
  Here's how to use this app:
88
 
89
- 1. Step 1: ...
90
- 2. Step 2: ...
91
- 3. Step 3: ...
92
 
93
- Please note that ...
94
 
95
  ### Uploading Your XLS File
96
 
97
- To upload your XLS file, ...
98
 
99
  ### Using the ChatGPT-4 NLP Model
100
 
101
- To use the ChatGPT-4 NLP model, ...
102
 
103
  ### Understanding the Results
104
 
105
- When you receive the results, ...
106
 
107
  ### Troubleshooting
108
 
109
- If you encounter any problems, ...
110
 
111
  ## Contact
112
 
113
- If you have any questions, feel free to ...
114
  """, unsafe_allow_html=True)
 
115
 
116
 
117
  #-----------------
 
 
 
 
118
  if selected=="Home":
119
  #st.title("home")
120
 
 
6
  from streamlit_option_menu import option_menu
7
 
8
  # Set Streamlit page configuration
9
+
10
+ st.set_page_config(page_title='XLS ChatGPT4',
11
  page_icon=":memo:",
12
  layout='wide',
13
  initial_sidebar_state='collapsed')
 
42
  selected = option_menu("Main Menu", ["Home", 'Help'],
43
  icons=['house', 'gear'], menu_icon="cast", default_index=0)
44
  selected
45
+ hide_style='''
46
+ <style>
47
+ #MainMenu {visibility:hidden;}
48
+ footer {visibility:hidden;}
49
+ .css-hi6a2p {padding-top: 0rem;}
50
+ head {visibility:hidden;}
51
+ </style>
52
+ '''
53
+ hide_streamlit_style = """
54
+ <style>
55
+ div[data-testid="stToolbar"] {
56
+ visibility: hidden;
57
+ height: 0%;
58
+ position: fixed;
59
+ }
60
+ div[data-testid="stDecoration"] {
61
+ visibility: hidden;
62
+ height: 0%;
63
+ position: fixed;
64
+ }
65
+ div[data-testid="stStatusWidget"] {
66
+ visibility: hidden;
67
+ height: 0%;
68
+ position: fixed;
69
+ }
70
+ #MainMenu {
71
+ visibility: hidden;
72
+ height: 0%;
73
+ }
74
+ header {
75
+ visibility: hidden;
76
+ height: 0%;
77
+ }
78
+ footer {
79
+ visibility: hidden;
80
+ height: 0%;
81
+ }
82
+ </style>
83
+ """
84
+ st.markdown(hide_streamlit_style, unsafe_allow_html=True)
85
+ st.markdown("""
86
+ <style>
87
+ .footer {
88
+ position: fixed;
89
+ left: 0;
90
+ bottom: 0;
91
+ width: 100%;
92
+ background-color: #f8f9fa;
93
+ color: black;
94
+ text-align: center;
95
+ padding: 10px;
96
+ }
97
+ </style>
98
+
99
+ <div class="footer">
100
+ <p>Copyright &copy; 2023 AI-Books. All Rights Reserved.</p>
101
+ </div>
102
+ """, unsafe_allow_html=True)
103
 
104
  if selected=="Help":
105
+
106
+ st.markdown(hide_style,unsafe_allow_html=True)
107
  # st.title("Help")
108
  # Import required libraries
109
  import streamlit as st
 
143
  st.markdown("""
144
  ## Getting Started
145
 
146
+ This project aims to provide a tool for data analysis on any office document. You can simply upload an Excel spreadsheet and ask any questions related to your data. Our system, powered by the ChatGPT-4 Natural Language Processing Model, will parse your data and respond to your questions.
147
 
148
  Here's how to use this app:
149
 
150
+ 1. Upload your XLS file: Use the file uploader to select and upload your XLS file.
151
+ 2. Enter your question: Ask a question related to your data in the question field. You can choose a question example from the dropdown list or type in a question on your own.
152
+ 3. Get your answer: Click 'Run' and the system will analyze your data and provide a response to your question.
153
 
154
+ Please note that this system uses a natural language processing model which may not always provide a perfect response, but it strives to deliver the best possible answer based on the data given.
155
 
156
  ### Uploading Your XLS File
157
 
158
+ To upload your XLS file, click on the 'Upload XLS' button and select your file from your system. The uploaded file will be converted to CSV format to allow for data analysis.
159
 
160
  ### Using the ChatGPT-4 NLP Model
161
 
162
+ The ChatGPT-4 model is a powerful language model that can answer questions based on the data provided. Enter a question related to your data in the question field. The model will parse your question, analyze the data, and generate a response.
163
 
164
  ### Understanding the Results
165
 
166
+ When you receive the results, they will be displayed in the 'Response' section. The response is generated by the ChatGPT-4 model based on your question and the data from the uploaded file.
167
 
168
  ### Troubleshooting
169
 
170
+ If you encounter any problems, please ensure that your XLS file is valid and that your question is clear and related to the data in your file.
171
 
172
  ## Contact
173
 
174
+ If you have any questions, feel free to contact the developer.
175
  """, unsafe_allow_html=True)
176
+
177
 
178
 
179
  #-----------------
180
+
181
+
182
+
183
+
184
  if selected=="Home":
185
  #st.title("home")
186
 
data.csv ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0,First Name,Last Name,Gender,Country,Age,Date,Id
2
+ 1,Dulce,Abril,Female,United States,32,15/10/2017,1562
3
+ 2,Mara,Hashimoto,Female,Great Britain,25,16/08/2016,1582
4
+ 3,Philip,Gent,Male,France,36,21/05/2015,2587
5
+ 4,Kathleen,Hanner,Female,United States,25,15/10/2017,3549
6
+ 5,Nereida,Magwood,Female,United States,58,16/08/2016,2468
7
+ 6,Gaston,Brumm,Male,United States,24,21/05/2015,2554
8
+ 7,Etta,Hurn,Female,Great Britain,56,15/10/2017,3598
9
+ 8,Earlean,Melgar,Female,United States,27,16/08/2016,2456
10
+ 9,Vincenza,Weiland,Female,United States,40,21/05/2015,6548
11
+ 10,Fallon,Winward,Female,Great Britain,28,16/08/2016,5486
12
+ 11,Arcelia,Bouska,Female,Great Britain,39,21/05/2015,1258
13
+ 12,Franklyn,Unknow,Male,France,38,15/10/2017,2579
14
+ 13,Sherron,Ascencio,Female,Great Britain,32,16/08/2016,3256
15
+ 14,Marcel,Zabriskie,Male,Great Britain,26,21/05/2015,2587
16
+ 15,Kina,Hazelton,Female,Great Britain,31,16/08/2016,3259
17
+ 16,Shavonne,Pia,Female,France,24,21/05/2015,1546
18
+ 17,Shavon,Benito,Female,France,39,15/10/2017,3579
19
+ 18,Lauralee,Perrine,Female,Great Britain,28,16/08/2016,6597
20
+ 19,Loreta,Curren,Female,France,26,21/05/2015,9654
21
+ 20,Teresa,Strawn,Female,France,46,21/05/2015,3569
22
+ 21,Belinda,Partain,Female,United States,37,15/10/2017,2564
23
+ 22,Holly,Eudy,Female,United States,52,16/08/2016,8561
24
+ 23,Many,Cuccia,Female,Great Britain,46,21/05/2015,5489
25
+ 24,Libbie,Dalby,Female,France,42,21/05/2015,5489
26
+ 25,Lester,Prothro,Male,France,21,15/10/2017,6574
27
+ 26,Marvel,Hail,Female,Great Britain,28,16/08/2016,5555
28
+ 27,Angelyn,Vong,Female,United States,29,21/05/2015,6125
29
+ 28,Francesca,Beaudreau,Female,France,23,15/10/2017,5412
30
+ 29,Garth,Gangi,Male,United States,41,16/08/2016,3256
31
+ 30,Carla,Trumbull,Female,Great Britain,28,21/05/2015,3264
32
+ 31,Veta,Muntz,Female,Great Britain,37,15/10/2017,4569
33
+ 32,Stasia,Becker,Female,Great Britain,34,16/08/2016,7521
34
+ 33,Jona,Grindle,Female,Great Britain,26,21/05/2015,6458
35
+ 34,Judie,Claywell,Female,France,35,16/08/2016,7569
36
+ 35,Dewitt,Borger,Male,United States,36,21/05/2015,8514
37
+ 36,Nena,Hacker,Female,United States,29,15/10/2017,8563
38
+ 37,Kelsie,Wachtel,Female,France,27,16/08/2016,8642
39
+ 38,Sau,Pfau,Female,United States,25,21/05/2015,9536
40
+ 39,Shanice,Mccrystal,Female,United States,36,21/05/2015,2567
41
+ 40,Chase,Karner,Male,United States,37,15/10/2017,2154
42
+ 41,Tommie,Underdahl,Male,United States,26,16/08/2016,3265
43
+ 42,Dorcas,Darity,Female,United States,37,21/05/2015,8765
44
+ 43,Angel,Sanor,Male,France,24,15/10/2017,3259
45
+ 44,Willodean,Harn,Female,United States,39,16/08/2016,3567
46
+ 45,Weston,Martina,Male,United States,26,21/05/2015,6540
47
+ 46,Roma,Lafollette,Female,United States,34,15/10/2017,2654
48
+ 47,Felisa,Cail,Female,United States,28,16/08/2016,6525
49
+ 48,Demetria,Abbey,Female,United States,32,21/05/2015,3265
50
+ 49,Jeromy,Danz,Male,United States,39,15/10/2017,3265
51
+ 50,Rasheeda,Alkire,Female,United States,29,16/08/2016,6125
52
+ 51,Dulce,Abril,Female,United States,32,15/10/2017,1562
53
+ 52,Mara,Hashimoto,Female,Great Britain,25,16/08/2016,1582
54
+ 53,Philip,Gent,Male,France,36,21/05/2015,2587
55
+ 54,Kathleen,Hanner,Female,United States,25,15/10/2017,3549
56
+ 55,Nereida,Magwood,Female,United States,58,16/08/2016,2468
57
+ 56,Gaston,Brumm,Male,United States,24,21/05/2015,2554
58
+ 57,Etta,Hurn,Female,Great Britain,56,15/10/2017,3598
59
+ 58,Earlean,Melgar,Female,United States,27,16/08/2016,2456
60
+ 59,Vincenza,Weiland,Female,United States,40,21/05/2015,6548
61
+ 60,Fallon,Winward,Female,Great Britain,28,16/08/2016,5486
62
+ 61,Arcelia,Bouska,Female,Great Britain,39,21/05/2015,1258
63
+ 62,Franklyn,Unknow,Male,France,38,15/10/2017,2579
64
+ 63,Sherron,Ascencio,Female,Great Britain,32,16/08/2016,3256
65
+ 64,Marcel,Zabriskie,Male,Great Britain,26,21/05/2015,2587
66
+ 65,Kina,Hazelton,Female,Great Britain,31,16/08/2016,3259
67
+ 66,Shavonne,Pia,Female,France,24,21/05/2015,1546
68
+ 67,Shavon,Benito,Female,France,39,15/10/2017,3579
69
+ 68,Lauralee,Perrine,Female,Great Britain,28,16/08/2016,6597
70
+ 69,Loreta,Curren,Female,France,26,21/05/2015,9654
71
+ 70,Teresa,Strawn,Female,France,46,21/05/2015,3569
72
+ 71,Belinda,Partain,Female,United States,37,15/10/2017,2564
73
+ 72,Holly,Eudy,Female,United States,52,16/08/2016,8561
74
+ 73,Many,Cuccia,Female,Great Britain,46,21/05/2015,5489
75
+ 74,Libbie,Dalby,Female,France,42,21/05/2015,5489
76
+ 75,Lester,Prothro,Male,France,21,15/10/2017,6574
77
+ 76,Marvel,Hail,Female,Great Britain,28,16/08/2016,5555
78
+ 77,Angelyn,Vong,Female,United States,29,21/05/2015,6125
79
+ 78,Francesca,Beaudreau,Female,France,23,15/10/2017,5412
80
+ 79,Garth,Gangi,Male,United States,41,16/08/2016,3256
81
+ 80,Carla,Trumbull,Female,Great Britain,28,21/05/2015,3264
82
+ 81,Veta,Muntz,Female,Great Britain,37,15/10/2017,4569
83
+ 82,Stasia,Becker,Female,Great Britain,34,16/08/2016,7521
84
+ 83,Jona,Grindle,Female,Great Britain,26,21/05/2015,6458
85
+ 84,Judie,Claywell,Female,France,35,16/08/2016,7569
86
+ 85,Dewitt,Borger,Male,United States,36,21/05/2015,8514
87
+ 86,Nena,Hacker,Female,United States,29,15/10/2017,8563
88
+ 87,Kelsie,Wachtel,Female,France,27,16/08/2016,8642
89
+ 88,Sau,Pfau,Female,United States,25,21/05/2015,9536
90
+ 89,Shanice,Mccrystal,Female,United States,36,21/05/2015,2567
91
+ 90,Chase,Karner,Male,United States,37,15/10/2017,2154
92
+ 91,Tommie,Underdahl,Male,United States,26,16/08/2016,3265
93
+ 92,Dorcas,Darity,Female,United States,37,21/05/2015,8765
94
+ 93,Angel,Sanor,Male,France,24,15/10/2017,3259
95
+ 94,Willodean,Harn,Female,United States,39,16/08/2016,3567
96
+ 95,Weston,Martina,Male,United States,26,21/05/2015,6540
97
+ 96,Roma,Lafollette,Female,United States,34,15/10/2017,2654
98
+ 97,Felisa,Cail,Female,United States,28,16/08/2016,6525
99
+ 98,Demetria,Abbey,Female,United States,32,21/05/2015,3265
100
+ 99,Jeromy,Danz,Male,United States,39,15/10/2017,3265
101
+ 100,Rasheeda,Alkire,Female,United States,29,16/08/2016,6125