Timmyafolami commited on
Commit
557d253
·
verified ·
1 Parent(s): 1754a9e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +266 -266
app.py CHANGED
@@ -1,267 +1,267 @@
1
- import streamlit as st
2
- import pandas as pd
3
- from utils import ai_markerter, market_validator
4
- import time
5
-
6
- ########################## Data Set Up ############################
7
- # loading the data
8
- first_call_off = pd.read_csv('first_call_off.csv')
9
- fourth_call_off_abc = pd.read_csv('fourth_call_off_abc_df.csv')
10
- fourth_call_off_stock = pd.read_csv('fourth_call_off_stock.csv')
11
- list_price = pd.read_csv('list_price_df.csv')
12
- reagent_price = pd.read_csv('reagent_prices.csv')
13
-
14
-
15
- # a function to load the data and get info
16
- def get_info(product_name):
17
- # checking the PRODUCT column in all the dataframes, storing the result in a dictionary
18
- # adding a try except block to handle the case where the product is not found in the dataframe
19
- dict_list = []
20
- df_list = [first_call_off, fourth_call_off_abc, fourth_call_off_stock, list_price, reagent_price]
21
- for df in df_list:
22
- dict_info = {}
23
- if product_name in df['PRODUCTS'].values:
24
- dict_info['Product'] = product_name
25
- dict_info['Category'] = df['CATEGORY'][df['PRODUCTS'] == product_name].values[0]
26
- dict_info['Unit Price'] = df['UNIT NGN'][df['PRODUCTS'] == product_name].values[0]
27
- dict_info['Cinuc Price'] = df['CINUC PRICE'][df['PRODUCTS'] == product_name].values[0]
28
- dict_info['Exchange Rate'] = df['EXCHANGE RATE'][df['PRODUCTS'] == product_name].values[0]
29
- dict_info['Date'] = df['DATE'][df['PRODUCTS'] == product_name].values[0]
30
- dict_list.append(dict_info)
31
- return dict_list
32
-
33
- product_lists = ['AFP i- chromax',
34
- 'AIC NOW catridge for HB Aic determination 10.PKT',
35
- 'Agary 2ml single-use syringes 23G X11/4 100 /PACK',
36
- 'Antibiotics multidisk( AB- DISC) gram neg',
37
- 'Antibiotics multidisk( AB- DISC) gram pos',
38
- 'Antibiotics multidisk( AB-DISC) gram neg',
39
- 'Antibiotics multidisk( AB-DISC) gram pos',
40
- 'Autoclave tapes (roll)',
41
- 'BATTERY LITHIUM A A3.6V',
42
- 'BHCG i- chromax',
43
- 'BioMed sicle scan for rapid genotye X25 /PKT',
44
- 'Bispot 1 &2 Determinate pkt',
45
- 'Bispot 1 &2 Determine pkt ALEERE',
46
- 'Blood group A typing serum 10ml/ 10 bottles /pkt by Biotec',
47
- 'Blood group AB typing serum 10ml/ 10 bottles /pkt by Biotec',
48
- 'Blood group B typing serum 10ml/ 10 bottles /pkt by Biotec',
49
- 'Blood group D typing serum 10ml/ 10 bottles /pkt by Biotec',
50
- 'CEA i- chromax',
51
- 'CK-MB i- chromax',
52
- 'CLED 500g',
53
- 'COBAS 3 C111 CLEANER',
54
- 'COBAS 3 C111 PROBE CLEANER 500ML',
55
- 'COBAS C 11 GLU2 GLUCOSE 400 TESTS',
56
- 'COBAS C 111 ALKALINE PHOS 400 TESTS',
57
- 'COBAS C 111 ALT (GPT) 400 TESTS',
58
- 'COBAS C 111 AST (GOT) 400 TESTS',
59
- 'COBAS C 111 Automated system CFAS 12 x 3ml botlles /pkt',
60
- 'COBAS C 111 BLT3 TOTAL BILIRUBIN',
61
- 'COBAS C 111 CFAS Lipid',
62
- 'COBAS C 111 CHOL3 CHOLESTEROL 400 TESTS',
63
- 'COBAS C 111 DEPROTEINIZER 2 bottles / pkt',
64
- 'COBAS C 111 PRINTER PAPER 4 rolls /PKT',
65
- 'COBAS C 111 TRIGLYCERIDES 200 TESTS',
66
- 'COBAS C 111 UREA 400 TESTS',
67
- 'COBAS C 111 URIC ACID PLUS 400 TESTS',
68
- 'COBAS C111 CREATININE 400 TESTS',
69
- 'COBAS C111 HDL 400TESTS',
70
- 'COBAS C111 SAMPLE CUPS 1000/PKT',
71
- 'COBAS C111 SODIUN CHLORIDE',
72
- 'COBAS INTEGRA C 111 ACTIVATOR 9X12 ml bottles /pt',
73
- 'CORTISOL i- chromax',
74
- 'CRP i- chromax',
75
- 'CUVETTE SEGMENT COBAS C 111 5,000 pcs/pkt',
76
- 'Chloroscope complete kit with ortholidine',
77
- 'Cholesterol (Accu Answer)',
78
- 'Clean and check',
79
- 'Complete set Vacutainer 4ml EDTA by 1000/pkt BD',
80
- 'Conical Flask 1000ml',
81
- 'Conical Flask 250ml',
82
- 'Conical Flask 500ml',
83
- 'Cotton wool non absorbent 500g',
84
- 'D-DIMER i- chromax',
85
- 'D-DIMER i-chromax',
86
- 'Dependaplast waterproof round spot plasters 100/pkt',
87
- 'Electrophoresing buffer, 6.1g x 10 shandon/pky',
88
- 'Epson ribbon for Reflotron printer',
89
- 'Erytrocyte sedimentation rate, dispet 100/pkt',
90
- 'FERRITIN i- chromax',
91
- 'FSH i- chromax',
92
- 'Febrile antigen test (OMEGA) 8 x 5ml with controls',
93
- 'Febrile antigen test (VOSAN) 8 x 5ml with controls',
94
- "Field's stain A 100ml",
95
- "Field's stain B 100ml",
96
- 'Filter paper whatman 42 ashless 12.5 cm 100/pkt',
97
- 'Giemsa Stain 100ml/bottle ferntec biosciences',
98
- 'Glucose (Accu Answer)',
99
- 'HALOGEN LAMP for COBAS c111',
100
- 'HCG i- chromax',
101
- 'HCG test strips Diaspot, diagnostic USA,/ Antec type/ 50/pkt',
102
- 'HbA1C i- chromax',
103
- 'Heavy duty oxivir TB bench wipes AHP approved',
104
- 'HsCRP i- chromax',
105
- 'Immersion oil 100ml',
106
- 'Insta TEST 6 PLUS lamotte 50strips/pkt',
107
- 'Insta iron Lamotte25 strips/pkt',
108
- 'LH i- chromax',
109
- 'Labacon H.pylori',
110
- 'Laboratory lighter plastic gun type',
111
- 'Latex examination gloves (by Sempercare) 100 7L',
112
- 'Latex examination gloves (by Sempercare) 100 8-9L',
113
- 'MICROALBUMIN i- chromax',
114
- 'MYOGLOBIN same',
115
- 'Macconkey agar 500g oxoid',
116
- 'Manfred grease free crytal clear slides 72/Pack x20',
117
- 'Manifred cover slips 50 x10/pkt',
118
- 'Methylated spirit 4l BDH with MSDS',
119
- 'Mindray UA66 uirinalysis strips 50/pkt',
120
- 'Multistrips for urinalysis, ACON LABS',
121
- 'Oxoid Blood agar base 500gm by pronadis product',
122
- 'Oxoid CLED agar 500grams pronadisa product',
123
- 'Oxoid Iso- sensitest agar agar 500gm pronadisa product',
124
- 'Oxoid Iso-sensitest agar agar 500gm pronadisa product',
125
- 'Oxoid MacConkey agar 500gm by pronadisa procuct',
126
- 'Oxoid Nutrient agar 500gm pronadisa product',
127
- 'Oxoid Yeast extract agar 500gm pronadisa product',
128
- 'PCT i- chromax',
129
- 'PROBE SET COBAS c111',
130
- 'PROGESTERONE i- chromax',
131
- 'PROLACTIN i- chromax',
132
- 'PSA i- chromax',
133
- 'Paper tapes (Rolls)',
134
- 'Parazone 500ml x 20bottles /ctn',
135
- 'Pipette tips (1-200ul) blue type x 1000/pkt EPPENDDORE',
136
- 'Pyrix Beaker 1000ml',
137
- 'Pyrix Beaker 100ml',
138
- 'Pyrix Beaker 2000 ml',
139
- 'Pyrix Beaker 250ml',
140
- 'Pyrix Beaker 500ml',
141
- 'QBC HEAMATOLOGY/MALARIA TUBES 250T',
142
- 'QBC HEAMATOLOGY/MALARIA TUBES TUBES 250T',
143
- 'QBC HEMATOLOGY/MALARIA TUBES TUBES 250T',
144
- 'RF IgM i- chromax',
145
- 'Reflotron AST/GOT x30 stripes/pkt',
146
- 'Reflotron AST/GOT x30 stripes/pkt stripes/pkt',
147
- 'Reflotron Alk.Phosphate x 30 stripes/pkt',
148
- 'Reflotron Bilirubin x 30 stripes/pkt',
149
- 'Reflotron Cholesterol x30 stripes/pkt',
150
- 'Reflotron Creatinine x30 stripes/pkt',
151
- 'Reflotron GPT/ALT x 30 stripes/pkt',
152
- 'Reflotron Gamma GT x 30 stripes/pkt',
153
- 'Reflotron Glucose 15 x 2 stripes /pkt',
154
- 'Reflotron HDL Cholesterol x 30 stripes/pkt',
155
- 'Reflotron Pancreatic Amylase 15 x 2',
156
- 'Reflotron Pancreatic Amylase 15 x 2 stripes/pkt',
157
- 'Reflotron Pancreatic Amylase 15x2 stripes/pkt',
158
- 'Reflotron Potassium x 30',
159
- 'Reflotron Pottasium x 30',
160
- 'Reflotron Triglycerides x30 stripes/pkt',
161
- 'Reflotron Urea 15 x 2 stripes/pkt',
162
- 'Reflotron Uric Acid x 30 stripes/pkt',
163
- 'S- monovette 4.5ml lithium heparin Sarstedt x 500/cartoon',
164
- 'S-monovette 2.6ml EDTA by Sarstedt x500/carton *',
165
- 'SD BIO LINE H. Pylori Antibody test 30 tests /pkt',
166
- 'SD BIO LINE H.Pylori Antibody test 30 tests /pkt',
167
- 'SD BIO LINE HBV test kit',
168
- 'SD BIO LINE HIV 1/2 antibody test kit 3.0 25/pkt',
169
- 'SD BIO LINE HIV Ag/Ab combo 30tests/pkt',
170
- 'SD BIOLINE 30 TEST/PKT. (HAV)',
171
- 'SD BIOLINE HAC 30 TEST/PKT. (HAV)',
172
- 'SD BIOLINE HCV 3.0 30 tests/pkt',
173
- 'SD BIOLINE HIV ELISA 3.0 Confirmatory test kit',
174
- 'SD BIOLINE MALARIA Ag P. f ELISA Test',
175
- 'SD BIOLINE Prostatic specific antigen ( PSA) 30/pkt',
176
- 'SD BIOLINE Rheumatoid athritis test kit 30 tests /pkt',
177
- 'SD BIOLINE Strep A antigen test 25 tests /pkts',
178
- 'SD BIOLINE TB Ag test kit 25/kpt',
179
- 'SD MALARIA SINGLE UNITS',
180
- 'SD Malaria kit HRP2/Pldh (Pf PAN )',
181
- 'SD malaria Ag Pf.kit for multiple use, 25/pkt BIOLINE',
182
- 'SD malaria Ag Pf.kit for single use, 25/pkt BIOLINE',
183
- 'STATPAK HIV 1/2',
184
- 'Sarstedt multi-safe comfort 6l, sharp box',
185
- 'Sarstedt standardinnoculation loop(50)/pkt',
186
- 'Starstedt Safety sterile petri dish disposable type 92/16mm/ctn',
187
- 'Sterilin type petri dish containers / 100cm',
188
- 'Sterilin type universal containers, (for urine) Red cap type(400)/ctn',
189
- 'T3 i- chromax',
190
- 'T4 i- chromax',
191
- 'TESTOSTERONE i- chromax',
192
- 'TSH i- chromax',
193
- 'Tn-I i- chromax',
194
- 'UNIGOLD HIV test kit',
195
- 'Uristix for urinalysis, plus auto check, SIEMENS/ 100/PKT',
196
- 'Veneral Disease Resarch LAB antigen test, VDRL TEST.',
197
- 'Veneral Disease Research Laboratory (VDRL) TEST KIT',
198
- 'Vit D I-Chromax',
199
- 'Water quality quick test with probefor PH, ORP, EC, DO and Turbidity',
200
- 'cellulose acetate foils X50 Bayer',
201
- 'cellulose acetate strips shandon 60 x150mm x 100/pkt',
202
- 'mindray 5 heaamatology reagent Cleaner',
203
- 'mindray 5 heaamatology reagent Diluent 20ml',
204
- 'mindray 5 heaamatology reagent Rinse1L X 4',
205
- 'mindray 5 heaamatology reagent leo 1 lyse1L X4',
206
- 'mindray 5 heaamatology reagent leo 11 lyse(400mlx4)',
207
- 'mindray 5 heamatology reagent Cleaner',
208
- 'mindray 5 heamatology reagent Diluent 20ml',
209
- 'mindray 5 heamatology reagent Rinse1L X 4',
210
- 'mindray 5 heamatology reagent leo 1 lyse1L X4',
211
- 'mindray 5 heamtology reagents 53LH LYSE 500/ x4',
212
- 'mindray 5 heamtology reagents 53LH LYSE 500/4',
213
- 'oxivir TB sprays AHP approved',
214
- 'sensigrip latex BX 100 INVACARE']
215
-
216
-
217
- # product = "Field's stain B 100ml"
218
- # data = get_info(product)
219
- # print(data)
220
-
221
- ############################ Streamlit App ############################
222
- # app config
223
- st.set_page_config(page_title="CINUC AI Marketer", page_icon="📈", layout="centered")
224
-
225
- # Adding some information to the app
226
- st.markdown("## Welcome to the CINUC AI Marketer")
227
- st.write("This is an AI marketer that helps you to predict the price of a product based on the data provided. It uses the data to make a recommendation on the price to be given to the customers for the next 1 year. The AI marketer also provides a short explanation of the strategy used to get to that price.")
228
-
229
- # App usage information
230
- st.markdown("### How to use the App")
231
- st.write("1. Enter today's exchange rate")
232
- st.write("2. Choose your profit margin")
233
- st.write("1. Select a product from the sidebar")
234
- st.write("2. The data for the selected product will be displayed")
235
- st.write("3. Click on the Analyze and Recommend button to get the price recommendation")
236
- st.write("4. The AI marketer will analyze the data and provide a price recommendation based on the forecasted exchange rate.")
237
-
238
- # today's exchange rate input
239
- today_rate = st.number_input("Enter Today's Exchange Rate", value=1650)
240
- # profit margin input in range 0-100
241
- profit_margin = st.number_input("Enter Profit Margin", value=50)
242
-
243
- # configuring the sidebar
244
- st.sidebar.title("Select a Product")
245
- product = st.sidebar.selectbox("Select a Product", product_lists)
246
- # adding a button to analyze the data
247
- # some static data
248
- Forecasted_price = 2500
249
- today = time.strftime("%d/%m/%Y")
250
- if st.sidebar.button("Analyze and Recommend"):
251
-
252
- # getting the data
253
- data = get_info(product)
254
-
255
- # displaying the data
256
- st.write("### Product Data")
257
- st.write(pd.DataFrame(data))
258
-
259
- # calling the ai_markerter function
260
- try:
261
- output = ai_markerter(data, Forecasted_price, today, today_rate, profit_margin)
262
- new_output = market_validator(data, Forecasted_price, today, today_rate, output, profit_margin)
263
- except Exception as e:
264
- new_output = f"An error occured, please try again"
265
-
266
- # displaying the output
267
  st.markdown(new_output)
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ from utils import ai_markerter, market_validator
4
+ import time
5
+
6
+ ########################## Data Set Up ############################
7
+ # loading the data
8
+ first_call_off = pd.read_csv('first_call_off.csv')
9
+ fourth_call_off_abc = pd.read_csv('fourth_call_off_abc_df.csv')
10
+ fourth_call_off_stock = pd.read_csv('fourth_call_off_stock.csv')
11
+ list_price = pd.read_csv('list_price_df.csv')
12
+ reagent_price = pd.read_csv('reagent_prices.csv')
13
+
14
+
15
+ # a function to load the data and get info
16
+ def get_info(product_name):
17
+ # checking the PRODUCT column in all the dataframes, storing the result in a dictionary
18
+ # adding a try except block to handle the case where the product is not found in the dataframe
19
+ dict_list = []
20
+ df_list = [first_call_off, fourth_call_off_abc, fourth_call_off_stock, list_price, reagent_price]
21
+ for df in df_list:
22
+ dict_info = {}
23
+ if product_name in df['PRODUCTS'].values:
24
+ dict_info['Product'] = product_name
25
+ dict_info['Category'] = df['CATEGORY'][df['PRODUCTS'] == product_name].values[0]
26
+ dict_info['Unit Price'] = df['UNIT NGN'][df['PRODUCTS'] == product_name].values[0]
27
+ dict_info['Cinuc Price'] = df['CINUC PRICE'][df['PRODUCTS'] == product_name].values[0]
28
+ dict_info['Exchange Rate'] = df['EXCHANGE RATE'][df['PRODUCTS'] == product_name].values[0]
29
+ dict_info['Date'] = df['DATE'][df['PRODUCTS'] == product_name].values[0]
30
+ dict_list.append(dict_info)
31
+ return dict_list
32
+
33
+ product_lists = ['AFP i- chromax',
34
+ 'AIC NOW catridge for HB Aic determination 10.PKT',
35
+ 'Agary 2ml single-use syringes 23G X11/4 100 /PACK',
36
+ 'Antibiotics multidisk( AB- DISC) gram neg',
37
+ 'Antibiotics multidisk( AB- DISC) gram pos',
38
+ 'Antibiotics multidisk( AB-DISC) gram neg',
39
+ 'Antibiotics multidisk( AB-DISC) gram pos',
40
+ 'Autoclave tapes (roll)',
41
+ 'BATTERY LITHIUM A A3.6V',
42
+ 'BHCG i- chromax',
43
+ 'BioMed sicle scan for rapid genotye X25 /PKT',
44
+ 'Bispot 1 &2 Determinate pkt',
45
+ 'Bispot 1 &2 Determine pkt ALEERE',
46
+ 'Blood group A typing serum 10ml/ 10 bottles /pkt by Biotec',
47
+ 'Blood group AB typing serum 10ml/ 10 bottles /pkt by Biotec',
48
+ 'Blood group B typing serum 10ml/ 10 bottles /pkt by Biotec',
49
+ 'Blood group D typing serum 10ml/ 10 bottles /pkt by Biotec',
50
+ 'CEA i- chromax',
51
+ 'CK-MB i- chromax',
52
+ 'CLED 500g',
53
+ 'COBAS 3 C111 CLEANER',
54
+ 'COBAS 3 C111 PROBE CLEANER 500ML',
55
+ 'COBAS C 11 GLU2 GLUCOSE 400 TESTS',
56
+ 'COBAS C 111 ALKALINE PHOS 400 TESTS',
57
+ 'COBAS C 111 ALT (GPT) 400 TESTS',
58
+ 'COBAS C 111 AST (GOT) 400 TESTS',
59
+ 'COBAS C 111 Automated system CFAS 12 x 3ml botlles /pkt',
60
+ 'COBAS C 111 BLT3 TOTAL BILIRUBIN',
61
+ 'COBAS C 111 CFAS Lipid',
62
+ 'COBAS C 111 CHOL3 CHOLESTEROL 400 TESTS',
63
+ 'COBAS C 111 DEPROTEINIZER 2 bottles / pkt',
64
+ 'COBAS C 111 PRINTER PAPER 4 rolls /PKT',
65
+ 'COBAS C 111 TRIGLYCERIDES 200 TESTS',
66
+ 'COBAS C 111 UREA 400 TESTS',
67
+ 'COBAS C 111 URIC ACID PLUS 400 TESTS',
68
+ 'COBAS C111 CREATININE 400 TESTS',
69
+ 'COBAS C111 HDL 400TESTS',
70
+ 'COBAS C111 SAMPLE CUPS 1000/PKT',
71
+ 'COBAS C111 SODIUN CHLORIDE',
72
+ 'COBAS INTEGRA C 111 ACTIVATOR 9X12 ml bottles /pt',
73
+ 'CORTISOL i- chromax',
74
+ 'CRP i- chromax',
75
+ 'CUVETTE SEGMENT COBAS C 111 5,000 pcs/pkt',
76
+ 'Chloroscope complete kit with ortholidine',
77
+ 'Cholesterol (Accu Answer)',
78
+ 'Clean and check',
79
+ 'Complete set Vacutainer 4ml EDTA by 1000/pkt BD',
80
+ 'Conical Flask 1000ml',
81
+ 'Conical Flask 250ml',
82
+ 'Conical Flask 500ml',
83
+ 'Cotton wool non absorbent 500g',
84
+ 'D-DIMER i- chromax',
85
+ 'D-DIMER i-chromax',
86
+ 'Dependaplast waterproof round spot plasters 100/pkt',
87
+ 'Electrophoresing buffer, 6.1g x 10 shandon/pky',
88
+ 'Epson ribbon for Reflotron printer',
89
+ 'Erytrocyte sedimentation rate, dispet 100/pkt',
90
+ 'FERRITIN i- chromax',
91
+ 'FSH i- chromax',
92
+ 'Febrile antigen test (OMEGA) 8 x 5ml with controls',
93
+ 'Febrile antigen test (VOSAN) 8 x 5ml with controls',
94
+ "Field's stain A 100ml",
95
+ "Field's stain B 100ml",
96
+ 'Filter paper whatman 42 ashless 12.5 cm 100/pkt',
97
+ 'Giemsa Stain 100ml/bottle ferntec biosciences',
98
+ 'Glucose (Accu Answer)',
99
+ 'HALOGEN LAMP for COBAS c111',
100
+ 'HCG i- chromax',
101
+ 'HCG test strips Diaspot, diagnostic USA,/ Antec type/ 50/pkt',
102
+ 'HbA1C i- chromax',
103
+ 'Heavy duty oxivir TB bench wipes AHP approved',
104
+ 'HsCRP i- chromax',
105
+ 'Immersion oil 100ml',
106
+ 'Insta TEST 6 PLUS lamotte 50strips/pkt',
107
+ 'Insta iron Lamotte25 strips/pkt',
108
+ 'LH i- chromax',
109
+ 'Labacon H.pylori',
110
+ 'Laboratory lighter plastic gun type',
111
+ 'Latex examination gloves (by Sempercare) 100 7L',
112
+ 'Latex examination gloves (by Sempercare) 100 8-9L',
113
+ 'MICROALBUMIN i- chromax',
114
+ 'MYOGLOBIN same',
115
+ 'Macconkey agar 500g oxoid',
116
+ 'Manfred grease free crytal clear slides 72/Pack x20',
117
+ 'Manifred cover slips 50 x10/pkt',
118
+ 'Methylated spirit 4l BDH with MSDS',
119
+ 'Mindray UA66 uirinalysis strips 50/pkt',
120
+ 'Multistrips for urinalysis, ACON LABS',
121
+ 'Oxoid Blood agar base 500gm by pronadis product',
122
+ 'Oxoid CLED agar 500grams pronadisa product',
123
+ 'Oxoid Iso- sensitest agar agar 500gm pronadisa product',
124
+ 'Oxoid Iso-sensitest agar agar 500gm pronadisa product',
125
+ 'Oxoid MacConkey agar 500gm by pronadisa procuct',
126
+ 'Oxoid Nutrient agar 500gm pronadisa product',
127
+ 'Oxoid Yeast extract agar 500gm pronadisa product',
128
+ 'PCT i- chromax',
129
+ 'PROBE SET COBAS c111',
130
+ 'PROGESTERONE i- chromax',
131
+ 'PROLACTIN i- chromax',
132
+ 'PSA i- chromax',
133
+ 'Paper tapes (Rolls)',
134
+ 'Parazone 500ml x 20bottles /ctn',
135
+ 'Pipette tips (1-200ul) blue type x 1000/pkt EPPENDDORE',
136
+ 'Pyrix Beaker 1000ml',
137
+ 'Pyrix Beaker 100ml',
138
+ 'Pyrix Beaker 2000 ml',
139
+ 'Pyrix Beaker 250ml',
140
+ 'Pyrix Beaker 500ml',
141
+ 'QBC HEAMATOLOGY/MALARIA TUBES 250T',
142
+ 'QBC HEAMATOLOGY/MALARIA TUBES TUBES 250T',
143
+ 'QBC HEMATOLOGY/MALARIA TUBES TUBES 250T',
144
+ 'RF IgM i- chromax',
145
+ 'Reflotron AST/GOT x30 stripes/pkt',
146
+ 'Reflotron AST/GOT x30 stripes/pkt stripes/pkt',
147
+ 'Reflotron Alk.Phosphate x 30 stripes/pkt',
148
+ 'Reflotron Bilirubin x 30 stripes/pkt',
149
+ 'Reflotron Cholesterol x30 stripes/pkt',
150
+ 'Reflotron Creatinine x30 stripes/pkt',
151
+ 'Reflotron GPT/ALT x 30 stripes/pkt',
152
+ 'Reflotron Gamma GT x 30 stripes/pkt',
153
+ 'Reflotron Glucose 15 x 2 stripes /pkt',
154
+ 'Reflotron HDL Cholesterol x 30 stripes/pkt',
155
+ 'Reflotron Pancreatic Amylase 15 x 2',
156
+ 'Reflotron Pancreatic Amylase 15 x 2 stripes/pkt',
157
+ 'Reflotron Pancreatic Amylase 15x2 stripes/pkt',
158
+ 'Reflotron Potassium x 30',
159
+ 'Reflotron Pottasium x 30',
160
+ 'Reflotron Triglycerides x30 stripes/pkt',
161
+ 'Reflotron Urea 15 x 2 stripes/pkt',
162
+ 'Reflotron Uric Acid x 30 stripes/pkt',
163
+ 'S- monovette 4.5ml lithium heparin Sarstedt x 500/cartoon',
164
+ 'S-monovette 2.6ml EDTA by Sarstedt x500/carton *',
165
+ 'SD BIO LINE H. Pylori Antibody test 30 tests /pkt',
166
+ 'SD BIO LINE H.Pylori Antibody test 30 tests /pkt',
167
+ 'SD BIO LINE HBV test kit',
168
+ 'SD BIO LINE HIV 1/2 antibody test kit 3.0 25/pkt',
169
+ 'SD BIO LINE HIV Ag/Ab combo 30tests/pkt',
170
+ 'SD BIOLINE 30 TEST/PKT. (HAV)',
171
+ 'SD BIOLINE HAC 30 TEST/PKT. (HAV)',
172
+ 'SD BIOLINE HCV 3.0 30 tests/pkt',
173
+ 'SD BIOLINE HIV ELISA 3.0 Confirmatory test kit',
174
+ 'SD BIOLINE MALARIA Ag P. f ELISA Test',
175
+ 'SD BIOLINE Prostatic specific antigen ( PSA) 30/pkt',
176
+ 'SD BIOLINE Rheumatoid athritis test kit 30 tests /pkt',
177
+ 'SD BIOLINE Strep A antigen test 25 tests /pkts',
178
+ 'SD BIOLINE TB Ag test kit 25/kpt',
179
+ 'SD MALARIA SINGLE UNITS',
180
+ 'SD Malaria kit HRP2/Pldh (Pf PAN )',
181
+ 'SD malaria Ag Pf.kit for multiple use, 25/pkt BIOLINE',
182
+ 'SD malaria Ag Pf.kit for single use, 25/pkt BIOLINE',
183
+ 'STATPAK HIV 1/2',
184
+ 'Sarstedt multi-safe comfort 6l, sharp box',
185
+ 'Sarstedt standardinnoculation loop(50)/pkt',
186
+ 'Starstedt Safety sterile petri dish disposable type 92/16mm/ctn',
187
+ 'Sterilin type petri dish containers / 100cm',
188
+ 'Sterilin type universal containers, (for urine) Red cap type(400)/ctn',
189
+ 'T3 i- chromax',
190
+ 'T4 i- chromax',
191
+ 'TESTOSTERONE i- chromax',
192
+ 'TSH i- chromax',
193
+ 'Tn-I i- chromax',
194
+ 'UNIGOLD HIV test kit',
195
+ 'Uristix for urinalysis, plus auto check, SIEMENS/ 100/PKT',
196
+ 'Veneral Disease Resarch LAB antigen test, VDRL TEST.',
197
+ 'Veneral Disease Research Laboratory (VDRL) TEST KIT',
198
+ 'Vit D I-Chromax',
199
+ 'Water quality quick test with probefor PH, ORP, EC, DO and Turbidity',
200
+ 'cellulose acetate foils X50 Bayer',
201
+ 'cellulose acetate strips shandon 60 x150mm x 100/pkt',
202
+ 'mindray 5 heaamatology reagent Cleaner',
203
+ 'mindray 5 heaamatology reagent Diluent 20ml',
204
+ 'mindray 5 heaamatology reagent Rinse1L X 4',
205
+ 'mindray 5 heaamatology reagent leo 1 lyse1L X4',
206
+ 'mindray 5 heaamatology reagent leo 11 lyse(400mlx4)',
207
+ 'mindray 5 heamatology reagent Cleaner',
208
+ 'mindray 5 heamatology reagent Diluent 20ml',
209
+ 'mindray 5 heamatology reagent Rinse1L X 4',
210
+ 'mindray 5 heamatology reagent leo 1 lyse1L X4',
211
+ 'mindray 5 heamtology reagents 53LH LYSE 500/ x4',
212
+ 'mindray 5 heamtology reagents 53LH LYSE 500/4',
213
+ 'oxivir TB sprays AHP approved',
214
+ 'sensigrip latex BX 100 INVACARE']
215
+
216
+
217
+ # product = "Field's stain B 100ml"
218
+ # data = get_info(product)
219
+ # print(data)
220
+
221
+ ############################ Streamlit App ############################
222
+ # app config
223
+ st.set_page_config(page_title="CINUC AI Marketer", page_icon="📈", layout="centered")
224
+
225
+ # Adding some information to the app
226
+ st.markdown("## Welcome to the CINUC AI Marketer")
227
+ st.write("This is an AI marketer that helps you to predict the price of a product based on the data provided. It uses the data to make a recommendation on the price to be given to the customers for the next 1 year. The AI marketer also provides a short explanation of the strategy used to get to that price.")
228
+
229
+ # App usage information
230
+ st.markdown("### How to use the App")
231
+ st.write("1. Enter today's exchange rate")
232
+ st.write("2. Choose your profit margin")
233
+ st.write("3. Select a product from the sidebar")
234
+ st.write("4. The data for the selected product will be displayed")
235
+ st.write("5. Click on the Analyze and Recommend button to get the price recommendation")
236
+ st.write("6. The AI marketer will analyze the data and provide a price recommendation based on the forecasted exchange rate.")
237
+
238
+ # today's exchange rate input
239
+ today_rate = st.number_input("Enter Today's Exchange Rate", value=1650)
240
+ # profit margin input in range 0-100
241
+ profit_margin = st.number_input("Enter Profit Margin", value=50)
242
+
243
+ # configuring the sidebar
244
+ st.sidebar.title("Select a Product")
245
+ product = st.sidebar.selectbox("Select a Product", product_lists)
246
+ # adding a button to analyze the data
247
+ # some static data
248
+ Forecasted_price = 2500
249
+ today = time.strftime("%d/%m/%Y")
250
+ if st.sidebar.button("Analyze and Recommend"):
251
+
252
+ # getting the data
253
+ data = get_info(product)
254
+
255
+ # displaying the data
256
+ st.write("### Product Data")
257
+ st.write(pd.DataFrame(data))
258
+
259
+ # calling the ai_markerter function
260
+ try:
261
+ output = ai_markerter(data, Forecasted_price, today, today_rate, profit_margin)
262
+ new_output = market_validator(data, Forecasted_price, today, today_rate, output, profit_margin)
263
+ except Exception as e:
264
+ new_output = f"An error occured, please try again"
265
+
266
+ # displaying the output
267
  st.markdown(new_output)