florentgbelidji HF staff commited on
Commit
890df00
β€’
1 Parent(s): 9076fb7

Changed examples

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
4
  pipe = pipeline("text-classification", model="qualitydatalab/autotrain-car-review-project-966432120")
5
 
6
  def predict(text):
7
- label2emoji = {"poor": "☹️", "ok": "😐", "great": "😊"}
8
  preds = pipe(text)[0]
9
  return label2emoji[preds["label"]], round(preds["score"], 5)
10
 
@@ -20,7 +20,8 @@ gradio_ui = gr.Interface(
20
  gr.outputs.Textbox(label="Score"),
21
  ],
22
  examples=[
23
- ["I love these running shoes!"], ["Ich hasse dieses Buch"],
 
24
  ],
25
  )
26
 
 
4
  pipe = pipeline("text-classification", model="qualitydatalab/autotrain-car-review-project-966432120")
5
 
6
  def predict(text):
7
+ label2emoji = {"poor": "πŸ™", "ok": "😐", "great": "😊"}
8
  preds = pipe(text)[0]
9
  return label2emoji[preds["label"]], round(preds["score"], 5)
10
 
 
20
  gr.outputs.Textbox(label="Score"),
21
  ],
22
  examples=[
23
+ [" Bought this Clio for my daughter 2 years ago. It was very well cared for with 95,000 miles. New brakes, tires, and all scheduled maintenance was done. We have had no problems (ex a torn axle boot) in 2 years and 22,000 miles. "],
24
+ ["I bought a brand new Scenic for my daily driver last year, and this is my biggest mistake! I should of do more researches before buying it. This car is the MOST POS ever. My suspension was bad after a couple thousand miles, the car made huge noise when the car is rolling."],
25
  ],
26
  )
27