Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,8 +14,8 @@ def print_probs(logits):
|
|
14 |
i = 0
|
15 |
while sum <= 95:
|
16 |
prob, idx = ans[i]
|
17 |
-
text = categories[idx] + ": "+ str(np.round(prob,1)
|
18 |
-
|
19 |
sum+=prob
|
20 |
i+=1
|
21 |
|
@@ -31,7 +31,7 @@ def make_prediction(text):
|
|
31 |
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
|
32 |
|
33 |
model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=8)
|
34 |
-
model_name = train_model2
|
35 |
model_path = model_name + '.zip'
|
36 |
model.load_state_dict(
|
37 |
torch.load(
|
|
|
14 |
i = 0
|
15 |
while sum <= 95:
|
16 |
prob, idx = ans[i]
|
17 |
+
text = categories[idx] + ": "+ str(np.round(prob,1))
|
18 |
+
st.markdown(text)
|
19 |
sum+=prob
|
20 |
i+=1
|
21 |
|
|
|
31 |
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
|
32 |
|
33 |
model = AutoModelForSequenceClassification.from_pretrained("distilbert-base-uncased", num_labels=8)
|
34 |
+
model_name = "train_model2"
|
35 |
model_path = model_name + '.zip'
|
36 |
model.load_state_dict(
|
37 |
torch.load(
|