Spaces:
Runtime error
Runtime error
Commit
•
32ba95a
1
Parent(s):
881188d
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from transformers import RobertaTokenizer
|
4 |
-
from
|
5 |
from text_preprocessing import preprocess_text
|
6 |
|
7 |
# Load the fine-tuned BERT model
|
8 |
model = RobertaClass()
|
9 |
-
model.load_state_dict(torch.load('
|
10 |
map_location=torch.device('cpu')))
|
11 |
|
12 |
# Load the tokenizer
|
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
from transformers import RobertaTokenizer
|
4 |
+
from model import RobertaClass
|
5 |
from text_preprocessing import preprocess_text
|
6 |
|
7 |
# Load the fine-tuned BERT model
|
8 |
model = RobertaClass()
|
9 |
+
model.load_state_dict(torch.load('model.bin',
|
10 |
map_location=torch.device('cpu')))
|
11 |
|
12 |
# Load the tokenizer
|