ddemszky
commited on
Commit
·
25ca7c8
1
Parent(s):
3a7acca
addedd logging
Browse files- handler.py +6 -1
- test.py +2 -2
handler.py
CHANGED
|
@@ -5,9 +5,14 @@ import weakref
|
|
| 5 |
|
| 6 |
from utils import clean_str, clean_str_nopunct
|
| 7 |
import torch
|
| 8 |
-
from transformers import BertTokenizer, BertForSequenceClassification
|
| 9 |
from utils import MultiHeadModel, BertInputBuilder, get_num_words
|
| 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
UPTAKE_MODEL='ddemszky/uptake-model'
|
| 12 |
REASONING_MODEL ='ddemszky/student-reasoning'
|
| 13 |
QUESTION_MODEL ='ddemszky/question-detection'
|
|
|
|
| 5 |
|
| 6 |
from utils import clean_str, clean_str_nopunct
|
| 7 |
import torch
|
|
|
|
| 8 |
from utils import MultiHeadModel, BertInputBuilder, get_num_words
|
| 9 |
|
| 10 |
+
import transformers
|
| 11 |
+
from transformers import BertTokenizer, BertForSequenceClassification
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
transformers.logging.set_verbosity_debug()
|
| 15 |
+
|
| 16 |
UPTAKE_MODEL='ddemszky/uptake-model'
|
| 17 |
REASONING_MODEL ='ddemszky/student-reasoning'
|
| 18 |
QUESTION_MODEL ='ddemszky/question-detection'
|
test.py
CHANGED
|
@@ -9,12 +9,12 @@ example = {
|
|
| 9 |
"inputs": [
|
| 10 |
{"uid": "1", "speaker": "Alice", "text": "How much is the fish?" },
|
| 11 |
{"uid": "2", "speaker": "Bob", "text": "I do not know about the fish. Because you put a long side and it’s a long side. What do you think." },
|
| 12 |
-
{"uid": "3", "speaker": "Alice", "text": "OK, thank you Bob." }
|
| 13 |
],
|
| 14 |
"parameters": {
|
| 15 |
"uptake_min_num_words": 5,
|
| 16 |
"uptake_speaker": "Bob",
|
| 17 |
-
"filename": "sample.csv"
|
| 18 |
}
|
| 19 |
}
|
| 20 |
|
|
|
|
| 9 |
"inputs": [
|
| 10 |
{"uid": "1", "speaker": "Alice", "text": "How much is the fish?" },
|
| 11 |
{"uid": "2", "speaker": "Bob", "text": "I do not know about the fish. Because you put a long side and it’s a long side. What do you think." },
|
| 12 |
+
{"uid": "3", "speaker": "Alice", "text": "OK, thank you Bob." }
|
| 13 |
],
|
| 14 |
"parameters": {
|
| 15 |
"uptake_min_num_words": 5,
|
| 16 |
"uptake_speaker": "Bob",
|
| 17 |
+
"filename": "sample.csv"
|
| 18 |
}
|
| 19 |
}
|
| 20 |
|