Spaces:
Runtime error
Runtime error
Commit
·
a98612e
1
Parent(s):
2963a5f
tukar dir
Browse files- .idea/workspace.xml +13 -13
- src/hf.py +2 -2
.idea/workspace.xml
CHANGED
|
@@ -41,20 +41,20 @@
|
|
| 41 |
<option name="hideEmptyMiddlePackages" value="true" />
|
| 42 |
<option name="showLibraryContents" value="true" />
|
| 43 |
</component>
|
| 44 |
-
<component name="PropertiesComponent"
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
}
|
| 57 |
-
}
|
| 58 |
<component name="RecentsManager">
|
| 59 |
<key name="CopyFile.RECENT_KEYS">
|
| 60 |
<recent name="D:\Development_Web\FullStackVercel\backend" />
|
|
|
|
| 41 |
<option name="hideEmptyMiddlePackages" value="true" />
|
| 42 |
<option name="showLibraryContents" value="true" />
|
| 43 |
</component>
|
| 44 |
+
<component name="PropertiesComponent">{
|
| 45 |
+
"keyToString": {
|
| 46 |
+
"Python.cth.executor": "Run",
|
| 47 |
+
"Python.hf (1).executor": "Run",
|
| 48 |
+
"Python.hf.executor": "Run",
|
| 49 |
+
"Python.hf2.executor": "Run",
|
| 50 |
+
"Python.main (1).executor": "Run",
|
| 51 |
+
"Python.main.executor": "Run",
|
| 52 |
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
| 53 |
+
"git-widget-placeholder": "main",
|
| 54 |
+
"last_opened_file_path": "D:/Development_Web/testFastAPI",
|
| 55 |
+
"settings.editor.selected.configurable": "project.propVCSSupport.DirectoryMappings"
|
| 56 |
}
|
| 57 |
+
}</component>
|
| 58 |
<component name="RecentsManager">
|
| 59 |
<key name="CopyFile.RECENT_KEYS">
|
| 60 |
<recent name="D:\Development_Web\FullStackVercel\backend" />
|
src/hf.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
from transformers import BertTokenizer, BertForSequenceClassification,TextClassificationPipeline, AutoModelForSequenceClassification
|
| 2 |
# Load tokenizer and model from the fine-tuned directory
|
| 3 |
-
model_path = 'intent_classification/TinyBERT_106_V2' # can try other checkpoints
|
| 4 |
|
| 5 |
-
tokenizer = BertTokenizer.from_pretrained(model_path
|
| 6 |
# model = BertForSequenceClassification.from_pretrained(model_path)
|
| 7 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 8 |
|
|
|
|
| 1 |
from transformers import BertTokenizer, BertForSequenceClassification,TextClassificationPipeline, AutoModelForSequenceClassification
|
| 2 |
# Load tokenizer and model from the fine-tuned directory
|
| 3 |
+
model_path = './intent_classification/TinyBERT_106_V2' # can try other checkpoints
|
| 4 |
|
| 5 |
+
tokenizer = BertTokenizer.from_pretrained(model_path)
|
| 6 |
# model = BertForSequenceClassification.from_pretrained(model_path)
|
| 7 |
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
| 8 |
|