Spaces:
Sleeping
Sleeping
Rowan Martnishn
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,11 @@ autoclassifier = joblib.load('AutoClassifier.pkl')
|
|
21 |
MODEL = "cardiffnlp/xlm-twitter-politics-sentiment"
|
22 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
class ScorePredictor(nn.Module):
|
25 |
# ... (Your ScorePredictor class)
|
26 |
def __init__(self, vocab_size, embedding_dim=128, hidden_dim=256, output_dim=1):
|
@@ -51,12 +56,12 @@ reddit = praw.Reddit(
|
|
51 |
|
52 |
subreddits = [
|
53 |
"florida",
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
]
|
61 |
|
62 |
# Global variables for data
|
|
|
21 |
MODEL = "cardiffnlp/xlm-twitter-politics-sentiment"
|
22 |
tokenizer = AutoTokenizer.from_pretrained(MODEL)
|
23 |
|
24 |
+
|
25 |
+
|
26 |
+
prediction_plot_base64 = None
|
27 |
+
|
28 |
+
|
29 |
class ScorePredictor(nn.Module):
|
30 |
# ... (Your ScorePredictor class)
|
31 |
def __init__(self, vocab_size, embedding_dim=128, hidden_dim=256, output_dim=1):
|
|
|
56 |
|
57 |
subreddits = [
|
58 |
"florida",
|
59 |
+
"ohio",
|
60 |
+
"libertarian",
|
61 |
+
"southpark",
|
62 |
+
"walkaway",
|
63 |
+
"truechristian",
|
64 |
+
"conservatives"
|
65 |
]
|
66 |
|
67 |
# Global variables for data
|