Update app.py
Browse files
app.py
CHANGED
|
@@ -42,13 +42,16 @@ def predict(text):
|
|
| 42 |
# 3. Build the Gradio Interface
|
| 43 |
demo = gr.Interface(
|
| 44 |
fn=predict,
|
| 45 |
-
inputs=gr.Textbox(lines=5, placeholder="
|
| 46 |
outputs=gr.Label(num_top_classes=2),
|
| 47 |
title="Amazon Sentiment Transformer",
|
| 48 |
-
description="A custom 4-layer Transformer
|
| 49 |
examples=[
|
| 50 |
-
["The
|
| 51 |
-
["
|
|
|
|
|
|
|
|
|
|
| 52 |
]
|
| 53 |
)
|
| 54 |
|
|
|
|
| 42 |
# 3. Build the Gradio Interface
|
| 43 |
demo = gr.Interface(
|
| 44 |
fn=predict,
|
| 45 |
+
inputs=gr.Textbox(lines=5, placeholder="Type your product review here..."),
|
| 46 |
outputs=gr.Label(num_top_classes=2),
|
| 47 |
title="Amazon Sentiment Transformer",
|
| 48 |
+
description="A custom 4-layer Transformer trained on 500k Amazon reviews.",
|
| 49 |
examples=[
|
| 50 |
+
["The build quality is incredible and it arrived much faster than expected. Highly recommend!"],
|
| 51 |
+
["Total waste of money. The item stopped working after two days and customer service was useless."],
|
| 52 |
+
["While the setup was a bit difficult, the performance once it's running is unmatched. Best in its class."],
|
| 53 |
+
["I was skeptical at first because of the price, but after using it for a month, I can honestly say it is perfect."],
|
| 54 |
+
["The camera is great, the battery is decent, but the software is buggy and keeps crashing."]
|
| 55 |
]
|
| 56 |
)
|
| 57 |
|