Update readme.py
Browse files
readme.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
from typing import Dict
|
3 |
-
|
4 |
bib = """
|
5 |
@inproceedings{dimosthenis-etal-2022-twitter,
|
6 |
title = "{T}witter {T}opic {C}lassification",
|
@@ -83,7 +83,7 @@ model.eval()
|
|
83 |
class_mapping = model.config.id2label
|
84 |
|
85 |
with torch.no_grad():
|
86 |
-
text =
|
87 |
tokens = tokenizer(text, return_tensors='pt')
|
88 |
output = model(**tokens)
|
89 |
flags = [sigmoid(s) > 0.5 for s in output[0][0].detach().tolist()]
|
|
|
1 |
import os
|
2 |
from typing import Dict
|
3 |
+
sample = "#NewVideo Cray Dollas- Water- Ft. Charlie Rose- (Official Music Video)- {{URL}} via {@YouTube@} #watchandlearn {{USERNAME}}"
|
4 |
bib = """
|
5 |
@inproceedings{dimosthenis-etal-2022-twitter,
|
6 |
title = "{T}witter {T}opic {C}lassification",
|
|
|
83 |
class_mapping = model.config.id2label
|
84 |
|
85 |
with torch.no_grad():
|
86 |
+
text = {sample}
|
87 |
tokens = tokenizer(text, return_tensors='pt')
|
88 |
output = model(**tokens)
|
89 |
flags = [sigmoid(s) > 0.5 for s in output[0][0].detach().tolist()]
|