Spaces:
Runtime error
Runtime error
Commit
·
ee9b192
1
Parent(s):
3543580
update
Browse files- app/main.py +2 -1
- requirements.txt +2 -1
app/main.py
CHANGED
|
@@ -5,6 +5,7 @@ try:
|
|
| 5 |
import re
|
| 6 |
from transformers import BertTokenizer
|
| 7 |
from model import IndoBERTBiLSTM
|
|
|
|
| 8 |
except Exception as e:
|
| 9 |
print(e)
|
| 10 |
|
|
@@ -102,7 +103,7 @@ def classify_multiple(data, model, tokenizer, device):
|
|
| 102 |
result_list = []
|
| 103 |
|
| 104 |
with torch.no_grad():
|
| 105 |
-
for i in range(len(input_ids)):
|
| 106 |
test_ids = input_ids[i]
|
| 107 |
test_attention_mask = attention_masks[i]
|
| 108 |
outputs = model(test_ids.to(device), test_attention_mask.to(device))
|
|
|
|
| 5 |
import re
|
| 6 |
from transformers import BertTokenizer
|
| 7 |
from model import IndoBERTBiLSTM
|
| 8 |
+
from stqdm import stqdm
|
| 9 |
except Exception as e:
|
| 10 |
print(e)
|
| 11 |
|
|
|
|
| 103 |
result_list = []
|
| 104 |
|
| 105 |
with torch.no_grad():
|
| 106 |
+
for i in stqdm(range(len(input_ids))):
|
| 107 |
test_ids = input_ids[i]
|
| 108 |
test_attention_mask = attention_masks[i]
|
| 109 |
outputs = model(test_ids.to(device), test_attention_mask.to(device))
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
| 1 |
streamlit
|
| 2 |
torch
|
| 3 |
-
transformers
|
|
|
|
|
|
| 1 |
streamlit
|
| 2 |
torch
|
| 3 |
+
transformers
|
| 4 |
+
stqdm
|