KhairulAmirinUM commited on
Commit
a98612e
·
1 Parent(s): 2963a5f
Files changed (2) hide show
  1. .idea/workspace.xml +13 -13
  2. 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"><![CDATA[{
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" />
 
41
  <option name="hideEmptyMiddlePackages" value="true" />
42
  <option name="showLibraryContents" value="true" />
43
  </component>
44
+ <component name="PropertiesComponent">{
45
+ &quot;keyToString&quot;: {
46
+ &quot;Python.cth.executor&quot;: &quot;Run&quot;,
47
+ &quot;Python.hf (1).executor&quot;: &quot;Run&quot;,
48
+ &quot;Python.hf.executor&quot;: &quot;Run&quot;,
49
+ &quot;Python.hf2.executor&quot;: &quot;Run&quot;,
50
+ &quot;Python.main (1).executor&quot;: &quot;Run&quot;,
51
+ &quot;Python.main.executor&quot;: &quot;Run&quot;,
52
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
53
+ &quot;git-widget-placeholder&quot;: &quot;main&quot;,
54
+ &quot;last_opened_file_path&quot;: &quot;D:/Development_Web/testFastAPI&quot;,
55
+ &quot;settings.editor.selected.configurable&quot;: &quot;project.propVCSSupport.DirectoryMappings&quot;
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, local_files_only=True)
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