Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,10 +6,9 @@ import pandas as pd
|
|
| 6 |
import matplotlib.pyplot as plt
|
| 7 |
|
| 8 |
#model_path = ("C:/Users/ankitdwivedi/OneDrive - Adobe/Desktop/NLP Projects/Video to Text Summarization/Model/models--distilbert--distilbert-base-uncased-finetuned-sst-2-english/snapshots/714eb0fa89d2f80546fda750413ed43d93601a13")
|
| 9 |
-
|
| 10 |
-
analyzer = pipeline("text-classification", model="distilbert/distilbert-base-uncased-finetuned-sst-2-english")
|
| 11 |
-
|
| 12 |
# print(analyzer(["This product is good", "This product is expensive"]))
|
|
|
|
| 13 |
|
| 14 |
def sentiment_analyzer(review):
|
| 15 |
sentiment = analyzer(review)
|
|
@@ -34,6 +33,7 @@ def Read_Analyze(file_object):
|
|
| 34 |
chart_object = sentiment_bar_chart(df)
|
| 35 |
return df, chart_object
|
| 36 |
|
|
|
|
| 37 |
# result = sentiment_analyzer("C:/Users/ankitdwivedi/OneDrive - Adobe/Desktop/NLP Projects/Video to Text Summarization/Files/all-data.csv")
|
| 38 |
# print (result)
|
| 39 |
|
|
|
|
| 6 |
import matplotlib.pyplot as plt
|
| 7 |
|
| 8 |
#model_path = ("C:/Users/ankitdwivedi/OneDrive - Adobe/Desktop/NLP Projects/Video to Text Summarization/Model/models--distilbert--distilbert-base-uncased-finetuned-sst-2-english/snapshots/714eb0fa89d2f80546fda750413ed43d93601a13")
|
| 9 |
+
#analyzer = pipeline("text-classification", model=model_path)
|
|
|
|
|
|
|
| 10 |
# print(analyzer(["This product is good", "This product is expensive"]))
|
| 11 |
+
analyzer = pipeline("text-classification", model="distilbert/distilbert-base-uncased-finetuned-sst-2-english")
|
| 12 |
|
| 13 |
def sentiment_analyzer(review):
|
| 14 |
sentiment = analyzer(review)
|
|
|
|
| 33 |
chart_object = sentiment_bar_chart(df)
|
| 34 |
return df, chart_object
|
| 35 |
|
| 36 |
+
|
| 37 |
# result = sentiment_analyzer("C:/Users/ankitdwivedi/OneDrive - Adobe/Desktop/NLP Projects/Video to Text Summarization/Files/all-data.csv")
|
| 38 |
# print (result)
|
| 39 |
|