Spaces:
Sleeping
Sleeping
debugging the error in my prediction
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ model_path = "model"
|
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 11 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 12 |
|
| 13 |
-
label_map = {0: "Negative
|
| 14 |
colors = {"Negative": "red", "Neutral": "gray", "Positive": "green"}
|
| 15 |
FEEDBACK_FILE = "user_feedback.csv"
|
| 16 |
|
|
@@ -49,7 +49,7 @@ with gr.Blocks(title="Amazon Review Sentiment App") as demo:
|
|
| 49 |
"<div style='text-align: center; font-size: 24px;'> <b> π¬π Review Analyzer</b></div>"
|
| 50 |
)
|
| 51 |
|
| 52 |
-
gr.Markdown("Enter a review below to check if it's **Positive
|
| 53 |
|
| 54 |
with gr.Row():
|
| 55 |
review_input = gr.Textbox(lines=10, placeholder="Type or paste a review here...", label="Your Review")
|
|
|
|
| 10 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 11 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 12 |
|
| 13 |
+
label_map = {0: "Negative", 1: "Neutral", 2: "Positive"}
|
| 14 |
colors = {"Negative": "red", "Neutral": "gray", "Positive": "green"}
|
| 15 |
FEEDBACK_FILE = "user_feedback.csv"
|
| 16 |
|
|
|
|
| 49 |
"<div style='text-align: center; font-size: 24px;'> <b> π¬π Review Analyzer</b></div>"
|
| 50 |
)
|
| 51 |
|
| 52 |
+
gr.Markdown("Enter a review below to check if it's **Positive π**, **Neutral π**, or **Negative π**.")
|
| 53 |
|
| 54 |
with gr.Row():
|
| 55 |
review_input = gr.Textbox(lines=10, placeholder="Type or paste a review here...", label="Your Review")
|