Kiuyha commited on
Commit
d90bceb
·
verified ·
1 Parent(s): 5ff8e15

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +33 -31
app.py CHANGED
@@ -104,11 +104,13 @@ st.title("🛍️ Advanced E-Commerce Price Predictor")
104
  with st.container():
105
  c1, c2 = st.columns([2, 1])
106
  with c1:
107
- p_name = st.text_input("Product Name", "IBOX iP 13 128GB 256GB Second BEKAS ORIGINAL 100% Seken Apple | MULUS 13 NORMAL FULLSET")
108
- p_desc = st.text_area("Description", "Sinyal ALL Oprator Quality Check Sebelum Mengirimkan Produk Garansi HP Dibantu Sampai Selesai Region : Usa Singapur China Korea Dll ️️HARAP DICATAT: Sinyal ALL Oprator ICould aman asli 100% ️Informasi yg Sering Ditanyakan 3utools Sinyal On Face id True Tone Kami pasti Quality Check sebelum mengirimkan pesanan. Bila produk sudah sampai test fungsi keseluruhan sebelum selesaikan transaksi. Jangan menyelesaikan pesanan sebelum unit benar benar di test fungsi keseluruhan untuk menjaga-jaga supaya tidak terjadi hal yang tidak diinginkan dan untuk claim garansi unit. ULAS DENGAN BIJAK Mohon untuk tidak langsung memberikan ulasan negatif dan bintang rendah sebelum komplain terselesaikan - BAD REVEW GARANSI HANGUS. Kelengkapan - Box (Ada kemungkinan Tidak ada stiker IMEI di Box) - Cable Tidak ada adaptor - Tidak ada garansi untuk Aksesoris Battery Health : 90%++ Request BH 95% Up to 100% : Bisa Silhakan Chat Tanya Admin Caranya KONDISI PRODUK : * ALL UNIT MULUS 98-99% * ALL OPERATOR (BISA SEMUA KARTU) * ALL UNIT ICLOUD AMAN * GARANSI 1 BULAN * TIDAK BISA REQUEST BATRE HEALTH SEGINI SEGINI . SILAHKAN TULIS DICATATAN, KITA USAHAKAN KIRIM BH 95+++. KETENTUAN RETUR BARANG : - Segel garansi harus utuh - Jangan terkena air atau cairan lainnya - Jangan terjatuh, retak, pecah - Jangan dibongkar / service sendiri - Tidak lock ICloud (Log out sebelum retur)")
 
 
109
  with c2:
110
  categories_list = get_categories()
111
- category = st.selectbox("Category", categories_list, index=categories_list.index('Handphone & Tablet'))
112
  shop_tier = st.selectbox(
113
  "Shop Tier",
114
  ["Regular Merchant", "Power Merchant", "Official Store"]
@@ -120,12 +122,12 @@ c_left, c_right = st.columns(2)
120
  with c_left:
121
  with st.expander("📦 Physical, Stock & Shipping", expanded=True):
122
  col1, col2, col3 = st.columns(3)
123
- weight = col1.number_input("Weight (g)", value=500)
124
- stock = col2.number_input("Stock", value=37)
125
- sold = col3.number_input("Sold", value=584)
126
 
127
  min_order = col1.number_input("Min Order", value=1)
128
- max_order = col2.number_input("Max Order", value=38)
129
 
130
  st.caption("Shipping Options")
131
  sc1, sc2, sc3 = st.columns(3)
@@ -138,23 +140,23 @@ with c_left:
138
  total_shipping = st.number_input("Total Shipping Types", value=2)
139
 
140
  is_preorder = st.checkbox("Preorder?", False)
141
- is_discount = st.checkbox("Discounted?", True)
142
 
143
  with st.expander("🏪 Shop Performance", expanded=False):
144
  shop_age = st.number_input("Shop Age (Days)", 365)
145
  shop_pop = st.number_input("Shop Popularity Score", 100)
146
  shop_city_pop = st.number_input("City Popularity", 1)
147
- resp_time = st.number_input("Response Time (mins)", 360)
148
- date_shop_open = st.date_input("Shop Open Since", datetime(2025, 2, 21, 6, 5, 59))
149
 
150
  with st.expander("⚙️ Advanced Shop Setup (Detailed Ratings)", expanded=False):
151
  st.caption("Input exact review counts for the entire shop")
152
  ac1, ac2, ac3, ac4, ac5 = st.columns(5)
153
- shop_r5 = ac1.number_input("Shop 5★", value=254)
154
- shop_r4 = ac2.number_input("Shop 4★", value=12)
155
- shop_r3 = ac3.number_input("Shop 3★", value=6)
156
- shop_r2 = ac4.number_input("Shop 2★", value=3)
157
- shop_r1 = ac5.number_input("Shop 1★", value=28)
158
 
159
  shop_total_rating = shop_r5 + shop_r4 + shop_r3 + shop_r2 + shop_r1
160
 
@@ -167,35 +169,35 @@ with c_left:
167
  with c_right:
168
  with st.expander("⭐ Product Ratings & Reviews", expanded=True):
169
  c1, c2, c3, c4, c5 = st.columns(5)
170
- r5 = c1.number_input("Prod 5★", value=58)
171
- r4 = c2.number_input("Prod 4★", value=1)
172
- r3 = c3.number_input("Prod 3★", value=2)
173
- r2 = c4.number_input("Prod 2★", value=2)
174
- r1 = c5.number_input("Prod 1★", value=6)
175
 
176
  total_rating_count = r5 + r4 + r3 + r2 + r1
177
  weighted_sum = (r5*5 + r4*4 + r3*3 + r2*2 + r1*1)
178
  avg_rating = weighted_sum / total_rating_count if total_rating_count > 0 else 0.0
179
  st.info(f"Avg Rating: {avg_rating:.2f} ({total_rating_count} ratings)")
180
 
181
- total_reviews = st.number_input("Total Written Reviews", value=52)
182
- reviews_w_img = st.number_input("Reviews w/ Images", value=28)
183
- satisfaction = st.slider("Buyer Satisfaction %", 0, 100, 85)
184
 
185
  with st.expander("💬 Count Review Topics", expanded=False):
186
  tc1, tc2 = st.columns(2)
187
- rev_qual = tc1.number_input("Quality", 47)
188
- rev_srv = tc2.number_input("Service", 10)
189
- rev_pack = tc1.number_input("Packaging", 4)
190
- rev_price = tc2.number_input("Price", 11)
191
- rev_desc = tc1.number_input("Description", 2)
192
- rev_ship = tc2.number_input("Shipping", 5)
193
 
194
  with st.expander("📸 Media & Listing Date", expanded=False):
195
  mc1, mc2 = st.columns(2)
196
  vid_count = mc1.number_input("Videos", 1)
197
- img_count = mc2.number_input("Images", 12)
198
- date_listing = st.date_input("Listing Created", datetime(2025, 7, 28, 9, 11, 10))
199
 
200
  feat_created = get_date_features(date_listing, "created_at")
201
  feat_shop = get_date_features(date_shop_open, "shop_open_since")
 
104
  with st.container():
105
  c1, c2 = st.columns([2, 1])
106
  with c1:
107
+ p_name = st.text_input("Product Name", "Jam tangan Automatic SF PS3/03 CCO Orange Rubber NFC Aktif fullset")
108
+ p_desc = st.text_area("""
109
+ Description", "SF PS3/03 aka "CCO" Kaca : Crystal Diameter : 47mm Weight : 138gr Case : Stainless Bezel : Stainless Strap : Rubber Buckle : Tang Movement : Automatic Japan Miyota 82A7 Quality : Clone 1:1 Function : Hour, Minute, Second, 24hour Indicator, Automatic. Include box fullset & extra rubber strap. Note : Untuk mencegah hal hal yg tidak diinginkan, harap membuat VIDEO UNBOXING sebelum membuka paket utk membantu jika diperlukannya klaim kerusakan atau kekurangan barang. Terima kasih
110
+ """)
111
  with c2:
112
  categories_list = get_categories()
113
+ category = st.selectbox("Category", categories_list, index=categories_list.index('Fashion Pria'))
114
  shop_tier = st.selectbox(
115
  "Shop Tier",
116
  ["Regular Merchant", "Power Merchant", "Official Store"]
 
122
  with c_left:
123
  with st.expander("📦 Physical, Stock & Shipping", expanded=True):
124
  col1, col2, col3 = st.columns(3)
125
+ weight = col1.number_input("Weight (g)", value=1000)
126
+ stock = col2.number_input("Stock", value=5)
127
+ sold = col3.number_input("Sold", value=0)
128
 
129
  min_order = col1.number_input("Min Order", value=1)
130
+ max_order = col2.number_input("Max Order", value=5)
131
 
132
  st.caption("Shipping Options")
133
  sc1, sc2, sc3 = st.columns(3)
 
140
  total_shipping = st.number_input("Total Shipping Types", value=2)
141
 
142
  is_preorder = st.checkbox("Preorder?", False)
143
+ is_discount = st.checkbox("Discounted?", False)
144
 
145
  with st.expander("🏪 Shop Performance", expanded=False):
146
  shop_age = st.number_input("Shop Age (Days)", 365)
147
  shop_pop = st.number_input("Shop Popularity Score", 100)
148
  shop_city_pop = st.number_input("City Popularity", 1)
149
+ resp_time = st.number_input("Response Time (mins)", 420)
150
+ date_shop_open = st.date_input("Shop Open Since", pd.to_datetime('1662746294'))
151
 
152
  with st.expander("⚙️ Advanced Shop Setup (Detailed Ratings)", expanded=False):
153
  st.caption("Input exact review counts for the entire shop")
154
  ac1, ac2, ac3, ac4, ac5 = st.columns(5)
155
+ shop_r5 = ac1.number_input("Shop 5★", value=31)
156
+ shop_r4 = ac2.number_input("Shop 4★", value=3)
157
+ shop_r3 = ac3.number_input("Shop 3★", value=0)
158
+ shop_r2 = ac4.number_input("Shop 2★", value=0)
159
+ shop_r1 = ac5.number_input("Shop 1★", value=0)
160
 
161
  shop_total_rating = shop_r5 + shop_r4 + shop_r3 + shop_r2 + shop_r1
162
 
 
169
  with c_right:
170
  with st.expander("⭐ Product Ratings & Reviews", expanded=True):
171
  c1, c2, c3, c4, c5 = st.columns(5)
172
+ r5 = c1.number_input("Prod 5★", value=0)
173
+ r4 = c2.number_input("Prod 4★", value=0)
174
+ r3 = c3.number_input("Prod 3★", value=0)
175
+ r2 = c4.number_input("Prod 2★", value=0)
176
+ r1 = c5.number_input("Prod 1★", value=0)
177
 
178
  total_rating_count = r5 + r4 + r3 + r2 + r1
179
  weighted_sum = (r5*5 + r4*4 + r3*3 + r2*2 + r1*1)
180
  avg_rating = weighted_sum / total_rating_count if total_rating_count > 0 else 0.0
181
  st.info(f"Avg Rating: {avg_rating:.2f} ({total_rating_count} ratings)")
182
 
183
+ total_reviews = st.number_input("Total Written Reviews", value=0)
184
+ reviews_w_img = st.number_input("Reviews w/ Images", value=0)
185
+ satisfaction = st.slider("Buyer Satisfaction %", 0, 100, 0)
186
 
187
  with st.expander("💬 Count Review Topics", expanded=False):
188
  tc1, tc2 = st.columns(2)
189
+ rev_qual = tc1.number_input("Quality", 0)
190
+ rev_srv = tc2.number_input("Service", 0)
191
+ rev_pack = tc1.number_input("Packaging", 0)
192
+ rev_price = tc2.number_input("Price", 0)
193
+ rev_desc = tc1.number_input("Description", 0)
194
+ rev_ship = tc2.number_input("Shipping", 0)
195
 
196
  with st.expander("📸 Media & Listing Date", expanded=False):
197
  mc1, mc2 = st.columns(2)
198
  vid_count = mc1.number_input("Videos", 1)
199
+ img_count = mc2.number_input("Images", 4)
200
+ date_listing = st.date_input("Listing Created", pd.to_datetime('2024-09-10T00:29:59+07:00'))
201
 
202
  feat_created = get_date_features(date_listing, "created_at")
203
  feat_shop = get_date_features(date_shop_open, "shop_open_since")