seanbenhur commited on
Commit
61697c7
1 Parent(s): b6283c9

add models

Browse files
app.py CHANGED
@@ -10,9 +10,9 @@ model_name = "microsoft/xlm-align-base"
10
  tokenizer_name = "microsoft/xlm-align-base"
11
  num_labels = 78
12
  num_intents = 23
13
- checkpoint_path = "/content/tamil_atis/xlm_align_base.bin"
14
- intent_encoder_path = "/content/tamil_atis/intent_annotations.npy"
15
- ner_encoder_path = "/content/tamil_atis/ner_annotations.npy"
16
 
17
  def predict_function(text):
18
  label_encoder = LabelEncoder()
10
  tokenizer_name = "microsoft/xlm-align-base"
11
  num_labels = 78
12
  num_intents = 23
13
+ checkpoint_path = "tamilatis/models/xlm_align_base.bin"
14
+ intent_encoder_path = "tamilatis/models/intent_classes.npy"
15
+ ner_encoder_path = "tamilatis/models/ner_classes.npy"
16
 
17
  def predict_function(text):
18
  label_encoder = LabelEncoder()
models/intent_classes.npy ADDED
Binary file (2.8 kB). View file
models/ner_classes.npy ADDED
Binary file (8.86 kB). View file
models/xlm_align_base.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bc9b69ea50334b1699e06a5ed1afd476b8f8d132d2165ea7bf38fd0a26181b4
3
+ size 1110211757
requirements.txt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ accelerate==0.10.0
2
+ gradio==3.0.20
3
+ huggingface_hub==0.8.1
4
+ hydra-core==1.2.0
5
+ numpy==1.21.6
6
+ omegaconf==2.2.2
7
+ pandas==1.3.5
8
+ scikit_learn==0.24.1
9
+ seqeval==1.2.2
10
+ torch==1.11.0+cu113
11
+ torchmetrics==0.9.1
12
+ tqdm==4.64.0
13
+ transformers==4.20.1
tamilatis/__pycache__/dataset.cpython-37.pyc ADDED
Binary file (3.88 kB). View file
tamilatis/__pycache__/model.cpython-37.pyc ADDED
Binary file (1.22 kB). View file
tamilatis/__pycache__/predict.cpython-37.pyc ADDED
Binary file (4 kB). View file
tamilatis/__pycache__/trainer.cpython-37.pyc ADDED
Binary file (5.24 kB). View file
tamilatis/main.py CHANGED
@@ -2,7 +2,8 @@ import logging
2
  import os
3
  import pickle
4
 
5
- import wandb
 
6
  import hydra
7
  import pandas as pd
8
  import torch.nn as nn
@@ -68,9 +69,11 @@ def main(cfg):
68
  # convert string labels to int
69
  label_encoder = LabelEncoder()
70
  label_encoder.fit(annotations)
 
71
 
72
  intent_encoder = LabelEncoder()
73
  intent_encoder.fit(intents)
 
74
 
75
  train_ds = ATISDataset(
76
  train_data, cfg.model.tokenizer_name, label_encoder, intent_encoder
2
  import os
3
  import pickle
4
 
5
+ #import wandb
6
+ import numpy as np
7
  import hydra
8
  import pandas as pd
9
  import torch.nn as nn
69
  # convert string labels to int
70
  label_encoder = LabelEncoder()
71
  label_encoder.fit(annotations)
72
+ np.save("/content/tamilatis/models/tamilatis/ner_classes.npy",label_encoder.classes_)
73
 
74
  intent_encoder = LabelEncoder()
75
  intent_encoder.fit(intents)
76
+ np.save("/content/tamilatis/models/tamilatis/intent_classes.npy",intent_encoder.classes_)
77
 
78
  train_ds = ATISDataset(
79
  train_data, cfg.model.tokenizer_name, label_encoder, intent_encoder