tomemojo commited on
Commit
443d813
·
0 Parent(s):

Duplicate from tomemojo/customerservice

Browse files
Files changed (4) hide show
  1. .gitattributes +34 -0
  2. README.md +13 -0
  3. app.py +233 -0
  4. requirements.txt +2 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Customerservice
3
+ emoji: 💩
4
+ colorFrom: red
5
+ colorTo: blue
6
+ sdk: gradio
7
+ sdk_version: 3.24.1
8
+ app_file: app.py
9
+ pinned: false
10
+ duplicated_from: tomemojo/customerservice
11
+ ---
12
+
13
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import openai
2
+ import gradio as gr
3
+ import os
4
+ API_TOKEN = os.environ["API_TOKEN"]
5
+
6
+ def chatbot(input,systemInstructions):
7
+
8
+ openai.api_key = API_TOKEN
9
+
10
+ if input:
11
+ messages = [
12
+ {"role": "system", "content": systemInstructions},
13
+ ]
14
+
15
+ messages.append({"role": "user", "content": input})
16
+
17
+ chat = openai.ChatCompletion.create(
18
+ model="gpt-3.5-turbo",
19
+ messages=messages,
20
+ temperature=0.2,
21
+ top_p=0.3,
22
+ n=1,
23
+ max_tokens = 1024,
24
+ presence_penalty = 0.5,
25
+ frequency_penalty = 0.5,
26
+ #logit_bias
27
+ )
28
+ reply = chat.choices[0].message.content
29
+ messages.append({"role": "assistant", "content": reply})
30
+ return reply
31
+
32
+
33
+ def emojobot(input):
34
+
35
+ #PHNknowledge = pd.read_csv('Layer1structureKnowledge.csv')
36
+ #generatedKnowledge = PHNknowledge['Knowledge'].values.tolist()
37
+ #random.shuffle(generatedKnowledge)
38
+ #generatedKnowledgeCorpus = ' '.join(generatedKnowledge[:75])
39
+
40
+ generatedKnowledgeCorpus = """
41
+ How far can I go on a single charge? The range depends on each bike model and several other factors such as the weight of the rider, the type grade of he terrain, wind speed and direction, tire pressure, temperature, cargo, etc. The average range on a fully charged battery is between 30 and 65 Miles. To get the best possible range the rider must pedal along with the P.A.S. Riding on throttle alone will considerably reduce the milage.
42
+ What's maximum speed? All models have a limited speed of 20 MPH on pedal assist to comply with Class 2 classification, meaning they can be ridden on most public roads and the rider does not require any special license.
43
+ How long does it take to fully charge a depleted battery? Typical battery full charging time is 5 hrs.
44
+ Do I need a special license or register my vehicle with the DMV? License is not required at this time by law, as long as the ebike is Class1 or Class 2. Insurance is optional but not required by law.
45
+ What's the maximum weight capacity? Payload varies depending on the model. Typical maximum payload range on trikes goes from 250 to 330 Lbs, this includes any additional cargo.
46
+ What kind of warranty do your trikes have? Each vehicle has a limited warranty for 1 year from the time of the purchase. Consult your warranty terms in your user manual for more details.
47
+ What happens if my vehicle requires service or a repair while it is under the warranty? Trikes require similar maintenance than regular bicycles such as chain tension adjustment, lubrication, screws and nuts re-torque etc. However there are certain components that given the case may require directly to the repair shop.
48
+ I ordered a completed trike. how is it packed? In most cases, the bike comes with one large box already preassembled, however you would need to install some components such as front wheel, fenders, handlebar and lights. Trikes are usually shipped in 3 boxes and require full assembly.
49
+ How long will the order be shipped out? It usually takes from 3-5 days after placing your order.
50
+ Where do you ship? We ship inside the continental USA. Shipping to Canada and Mexico would be possible but extra shipping and customs fees would be involved and need to be covered by the purchaser.
51
+ Can I stop by your warehouse and pick up my order? Yes. Let us know 48 hrs prior to your planned visit and we will make sure to have your order ready. We also provide fully assembly service with additional cost.
52
+ Do you offer any financial help for someone with poor credit? We do not offer any financial help or financing options for customers with poor credit. However, we give extra discount on our demo trikes.
53
+ For customers unable to afford the full price or with poor credit: Our website allows customers to select installment payments during the checkout process. If installment payments aren't an option, we provide demo vehicles. Our sales representatives can reach out to you with further information. Typically, demo vehicles are priced at about half the regular cost.
54
+
55
+ Test ride: At present, we have offices in Los Angeles, CA, and Orlando, FL, where you can schedule a test ride for our three-wheeled vehicles. Visit our website to book a time slot, but please note that Sundays are excluded.
56
+ If you are located in a different area or state, you can find our nearest dealers through our website and call them to arrange an appointment. If there are no dealers close to your location, please provide your details, and we will help you connect with nearby customers who already own our three-wheeled vehicles. They will be able to share their vehicles with you for a test ride.
57
+ In the future, if you decide to purchase one of our three-wheeled vehicles, you can also participate in this sharing service and receive rewards for doing so.
58
+
59
+ Why is your your product higher price compared with others? Our vehicles have a higher price point because they come equipped with advanced features, such as top-quality Bafang motors. These motors offer better performance and durability compared to the ordinary motors used in more affordable vehicles. The target market for tricycles is different from that of bicycles. Tricycle customers tend to place a higher value on safety, stability, and reliable after-sales service, as they often use these vehicles for daily commuting and longer trips.
60
+ On the other hand, bicycles are primarily used by young people and students, who tend to prioritize affordability over advanced features. They usually view bicycles as a convenient and economical means of transportation for shorter distances, without placing much emphasis on additional features or after-sales support. As a result, the prices of bicycles are generally lower than those of tricycles with advanced configurations.
61
+
62
+ Customers are encouraged to share their experiences, photos, and glowing reviews on our Facebook page, which may lead to receiving special gifts as a token of our appreciation.
63
+
64
+ how do I transport the trike? Does it easily come aport to take in car? We provide a custom-designed hitch rack specifically tailored for our tricycles, available for purchase to enhance your transportation experience. Our trike can be conveniently positioned horizontally in a van. To optimize the fit, simply rotate the handlebar 90 degrees.
65
+ Caddy Pro is 31-inch height, Bison S is 28-inch height, Bison Pro is 31-inch height.
66
+
67
+ The information of CADDY PRO:
68
+ MODEL CADDY PRO
69
+ Motor type DC Brushless
70
+ Motor power 500W
71
+ Rated Voltage 48V
72
+ Maximum speed 20MPH
73
+ Battery range 35Miles
74
+ Battery charging time 4 - 6hours
75
+ Battery type Lithium-Ion
76
+ Battery capacity 48V/15.6Ah
77
+ Dimensions (inch) 74 L X 31 W X 46 H
78
+ Frame Aluminum 6061
79
+ Maximum user weight 330lbs
80
+ Vehicle weight 90 lbs(with battery)
81
+ Transmission type 7-Speed
82
+ Front brake type Hydraulic Disc
83
+ Rear brake type Hydraulic Disc
84
+ Tire size 20 x 4.0" rear / 24 x 4.0" front
85
+ Stand over height 18in
86
+ Seat to ground height minimum 29in and maximum 37in
87
+ Front basket size 14.5 x 10.5 x 5.0 in
88
+ Rear basket size 21 x 17.5 x 10 in
89
+ Handlebar height Min: 41in / Max: 47in
90
+ Motor brand: Bafang
91
+ Battery Brand: XNW ( Brand with quality assurance )
92
+
93
+ Information of BISON PRO
94
+ Motor type DC Brushless
95
+ Motor power 750W
96
+ Rated Voltage 48 V
97
+ Maximum speed on PAS 20 MPH
98
+ Battery range 45 Miles
99
+ Battery charging time 4 - 6hours
100
+ Battery type Lithium-Ion
101
+ Battery capacity 48V/23.2Ah
102
+ Dimensions (inch) 74 L X 31 W X 46 H
103
+ Frame Aluminum alloy
104
+ Max. user weight 330 lbs
105
+ Vehicle weight 123 lbs (with battery)
106
+ Transmission type 7-Speed
107
+ Front brake type Hydraulic Disc
108
+ Rear brake type Hydraulic Disc
109
+ Tire size 20 x 4.0" rear / 24 x 4.0" front
110
+ Stand over height 15in
111
+ Seat to ground Min: 27in/Max: 36in
112
+ Front basket 14.5 x 10.5 x 4.5 in
113
+ Rear basket 21 x 17.5 x 7.5 in
114
+ Handlebar height Min: 41in / Max: 46in
115
+ Motor brand: Bafang
116
+ Battery Brand: XNW ( Brand with quality assurance )
117
+
118
+ Information of BISON S
119
+ Motor type DC Brushless
120
+ Motor power 500W
121
+ Rated Voltage 48 V
122
+ Maximum speed on PAS 20 MPH
123
+ Battery range 30 Miles
124
+ Battery charging time 4 - 6hours
125
+ Battery type Lithium-Ion
126
+ Battery capacity 48V/11.6Ah
127
+ Dimensions (inch) 70L X 28W X 40H
128
+ Frame Aluminum 6061
129
+ Max. user weight 250 lbs
130
+ Vehicle weight 86 lbs (with battery)
131
+ Transmission type 7-Speed
132
+ Front brake type Mechanical Disc
133
+ Rear brake type Mechanical Disc
134
+ Tire size 20 x 2.5"
135
+ Stand over height 14.5in
136
+ Seat to ground Min: 27in / Max: 36in
137
+ Front basket 14.5 x 10.5 x 4.5 in
138
+ Rear basket 21 x 17.5 x 7.5 in
139
+ Handlebar height Min: 36in / Max: 42in
140
+ Motor brand: Bafang
141
+ Battery Brand: XNW ( Brand with quality assurance )
142
+
143
+ Assembly Service:
144
+ When you purchase an electric trike from our company, we provide a convenient and hassle-free expert full assembly service, available for customers across all States. Our experienced technicians will professionally assemble your electric trike, ensuring that all components are properly installed, adjusted, and tested before it is shipped to you.
145
+ We take care of the shipping as well by sending your fully assembled electric trike on a pallet. This method of shipping ensures that your trike arrives safely and securely at your doorstep, without any damage or need for further assembly. The shipping is absolutely free of charge.
146
+ Once you receive your electric trike, you can immediately start enjoying your ride, knowing that it has been expertly assembled and tested by our team. This service saves you time and effort, allowing you to focus on getting the most out of your new electric trike.
147
+ Please let me know if you have any other questions or concerns about our expert full assembly service, and I'd be more than happy to assist you.
148
+
149
+ Warranty
150
+ To make a warranty claim, always keep the vehicle model, date of purchase, vehicle serial number, and information from the retailer where you purchased the vehicle handy.
151
+ The warranty is limited to the terms listed below:
152
+ Frame, Suspension, Motor: 1 year for parts.
153
+ Controller, Charger: 1 year for parts.
154
+ Battery: Warranty on the battery starts the date of purchase of the vehicle as new. The battery is sealed and cannot be opened or fixed. The battery should not have a percentage of nominal charge retention of 60% or less. Misuse of the battery, negligence or attempt to open or repair it will void the warranty.
155
+ General: The bicycle is backed up by a 1-year main warranty, certain components listed on this chart or consumables may be subject to a different period of coverage or not included in this warranty.
156
+ Consumables: Components subject to wear are not covered by the warranty: Tires, inner tubes, brake lines, brake pads, basket, wheel lining tape, light bulbs, LEDS, fuses, etc.
157
+ If the warranty is void for any reason the customer shall bear any repair or replacement costs resulting from vehicle misuse, negligence or abuse.
158
+ Always follow care and preventive maintenance procedures.
159
+ Always keep receipts from any services performed to the vehicle by an authorized distributor or service center.
160
+
161
+ The warranty will be voided by any of the following circumstances:
162
+ Failure to follow all directions or recommendations listed in the user manual.
163
+ Cycling collision, accidents or vehicle damage caused by careless parking
164
+ Acts in violation of laws
165
+ Failure to register your ebike
166
+ DIY repairs on electronics
167
+ Abusive use of the bicycle in off-road terrain, mud, snow, water, sand, gravel and water
168
+ If the bicycle is used as rental unit
169
+ Damages caused by natural disasters, such as earthquakes, lightning, fire, flooding and other hazards.
170
+ Rust and/or paint fading caused by heavy exposure to rain, hail, snow or direct sunlight for prolonged periods of time.
171
+ Overloading beyond the recommended capacity .
172
+ Damages caused by nails, needles, broken glass , debris, sharp rocks or other foreign objects.
173
+ Use of the vehicle for stunts, jumping from ramps, stairs, or elevated ramps.
174
+ If vehicle is used in competitions or racing.
175
+ Modifications made to the motor, electrical system, suspension frame, and battery.
176
+ Use of components not approved by the manufacturer.
177
+ Damages resulted from improper care and handling.
178
+ Due to the nature of the product some components must be exclusive from the manufacturer such as but not limited to the battery, motor, main gauge cluster, controllers, Led headlights, brake drums or disc rotors and pads etc. Other components such as tires, tubes, saddle, racks, baskets may be used from market-ready or compatible products previous approval from the retailer or manufacturer.
179
+
180
+ Return
181
+ We have a 30-day return policy, which means you have 30 days after receiving your EMOJO BIKE to request a return.
182
+ Returns are not allowed after 30 days of the delivery date.
183
+ To be eligible for a return, your item must be in the same condition that you received it, unworn, unused or the ebike must have less than ten (10) miles on the odometer, and must include all items that were inside the box (charger, keys, hardware, etc.), and in its original packaging. You will also need the receipt or proof of purchase.
184
+
185
+
186
+ Damages and issues
187
+ Please inspect your order upon reception and contact us immediately if the item is defective, damaged, or if you receive the wrong item, so that we can evaluate the issue and make it right for you.
188
+ To start a return, you can contact us at support@emojobike.com. If your return is accepted, we will send you a return shipping label, as well as instructions on how and where to send your package. Items sent back to us without first requesting a return will not be accepted. EMOJO bike is not responsible for the shipping cost of the packages returned by the customers themselves.
189
+ You can always contact us for any return question at support@emojobike.com
190
+
191
+
192
+ Shipping and Handling fee for non-quality issue return:
193
+ E-Bikes $150/pc for a return
194
+ E-Trikes $250/pc for a return
195
+ Phone Holder, charger $15/pc for a return
196
+ Front and Rear Basket $20/pc for a return
197
+ E-bike Batteries $30/pc for a return
198
+
199
+ Exchange for new model
200
+ This term is only for the unworn, unused, unopened package, the ebike/etrike
201
+ must have less than 10 miles on the odometer.
202
+ Within 30 days-Same model but different color $200/pc for the return
203
+ Within 30 days-Different model $200/pc for the return plus the price difference
204
+ Over 30 days Exchange is no longer possible
205
+ For returned items or items for exchange, we will need 3-6 business days upon receiving your item(s) to process the solution.
206
+ After this period, we will refund within 3 business days.
207
+ We will notify you once we’ve received and inspected your return, and let you know if the refund has been approved or not. If approved, the refund will be automatically processed on your original payment method. Please note that it may take some time for your bank or credit card company to process and post the refund.
208
+ """
209
+
210
+ generatedKnowledgeCorpus = generatedKnowledgeCorpus.replace("\n","")
211
+ systemInstructions = "You are a customer service representative. Use the following text and respond to customer. '\
212
+ If no answer is found in the following text start with 'ANSWER BASED ON EXTERNAL SEARCH'"
213
+ systemInstructions = systemInstructions + '\n\n' + generatedKnowledgeCorpus
214
+
215
+ response = chatbot(input, systemInstructions)
216
+
217
+ return response
218
+
219
+
220
+ inputs = gr.inputs.Textbox(label="Customer Question")
221
+ outputs = gr.outputs.Textbox(label="Suggested Response")
222
+
223
+ with gr.Blocks() as demo:
224
+
225
+ gr.Markdown(
226
+ """
227
+ # Emojo Customer Service| In Development
228
+ """
229
+ )
230
+ responseBox = gr.Interface(fn=emojobot, inputs=[inputs], outputs=outputs, allow_flagging='never')
231
+
232
+ if __name__ == "__main__":
233
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ openai
2
+ gradio