AnushS commited on
Commit
7dcd29a
·
1 Parent(s): ea2be09

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -6
README.md CHANGED
@@ -39,20 +39,23 @@ This model is a fine-tuned version of t5-small on a custom dataset derived from
39
 
40
  The Inference Api on the hugging face model page doesn't work well, load the model in jupyter notebook using the following code snippet:
41
 
42
- text = "" # add your hieroglyph gardiner code combination in the string
43
 
 
 
44
  from transformers import AutoTokenizer
45
 
46
- tokenizer = AutoTokenizer.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
47
  inputs = tokenizer(text, return_tensors="pt").input_ids
48
 
49
  from transformers import AutoModelForSeq2SeqLM
50
 
51
-
52
- model = AutoModelForSeq2SeqLM.from_pretrained("AnushS/hieroglyph_unicode_translator_t5_small")
53
  outputs = model.generate(inputs, max_new_tokens=40, do_sample=True, top_k=30, top_p=0.95)
54
  translated_keywords = str(tokenizer.decode(outputs[0], skip_special_tokens=True))
55
 
 
 
 
56
 
57
  Intended uses & limitations
58
 
@@ -64,8 +67,8 @@ The Model is intended to be used to translate hieroglyphs. The model does not pr
64
 
65
  The following hyperparameters were used during training:
66
  - learning_rate: 2e-05
67
- - train_batch_size: 1
68
- - eval_batch_size: 1
69
  - seed: 42
70
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
71
  - lr_scheduler_type: linear
 
39
 
40
  The Inference Api on the hugging face model page doesn't work well, load the model in jupyter notebook using the following code snippet:
41
 
 
42
 
43
+ text = "Translate hieroglyph gardiner code sequence to English: A4 A5 "
44
+
45
  from transformers import AutoTokenizer
46
 
47
+ tokenizer = AutoTokenizer.from_pretrained("Hieroglyph-Translator-Using-Gardiner-Codes")
48
  inputs = tokenizer(text, return_tensors="pt").input_ids
49
 
50
  from transformers import AutoModelForSeq2SeqLM
51
 
52
+ model = AutoModelForSeq2SeqLM.from_pretrained("Hieroglyph-Translator-Using-Gardiner-Codes")
 
53
  outputs = model.generate(inputs, max_new_tokens=40, do_sample=True, top_k=30, top_p=0.95)
54
  translated_keywords = str(tokenizer.decode(outputs[0], skip_special_tokens=True))
55
 
56
+ print(translated_keywords)
57
+
58
+ print(translated_keywords)
59
 
60
  Intended uses & limitations
61
 
 
67
 
68
  The following hyperparameters were used during training:
69
  - learning_rate: 2e-05
70
+ - train_batch_size: 16
71
+ - eval_batch_size: 16
72
  - seed: 42
73
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
74
  - lr_scheduler_type: linear