Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -25,10 +25,11 @@ def load_models():
|
|
25 |
tokenizer=AutoTokenizer.from_pretrained("usmiva/bert-deepfake-bg"))
|
26 |
|
27 |
st.session_state.emotions = pipeline(task="text-classification",
|
28 |
-
model=BertForSequenceClassification.from_pretrained("TRACES/emotions", use_auth_token=os.environ['ACCESS_TOKEN2'], num_labels=2),
|
29 |
tokenizer=AutoTokenizer.from_pretrained("TRACES/emotions", use_auth_token=os.environ['ACCESS_TOKEN2']))
|
30 |
|
31 |
|
|
|
32 |
def load_content():
|
33 |
with open('resource/page_content.json', encoding='utf8') as json_file:
|
34 |
return json.load(json_file)
|
|
|
25 |
tokenizer=AutoTokenizer.from_pretrained("usmiva/bert-deepfake-bg"))
|
26 |
|
27 |
st.session_state.emotions = pipeline(task="text-classification",
|
28 |
+
model=BertForSequenceClassification.from_pretrained("TRACES/emotions", use_auth_token=os.environ['ACCESS_TOKEN2'], num_labels=2, ignore_mismatched_sizes=True),
|
29 |
tokenizer=AutoTokenizer.from_pretrained("TRACES/emotions", use_auth_token=os.environ['ACCESS_TOKEN2']))
|
30 |
|
31 |
|
32 |
+
|
33 |
def load_content():
|
34 |
with open('resource/page_content.json', encoding='utf8') as json_file:
|
35 |
return json.load(json_file)
|