Text Generation
Transformers
PyTorch
Polish
gpt2
text-generation-inference
s3nh commited on
Commit
26ef93d
·
1 Parent(s): 26ac8cb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -13
README.md CHANGED
@@ -18,6 +18,10 @@ These repository does not contain an tokenizer object, at the moment (#TODO).
18
  ### Evaluation part
19
 
20
 
 
 
 
 
21
  import pandas as pd
22
  import torch
23
  from torch.utils.data import AutTokenizer
@@ -27,7 +31,6 @@ from typing import Any, TypeVar
27
  import pandas as pd
28
  import pickle
29
 
30
-
31
  MODEL_NAME: str = ''
32
 
33
 
@@ -46,15 +49,12 @@ def _generate_prompt(instruction, input=None):
46
  ### Input:
47
  {input}
48
  ### Response:"""
49
-
50
-
51
-
52
- data = pd.read_csv("alpaca_dolly.csv")
53
- dict_data = pd.DataFrame.to_dict(data, orient='records' )
54
-
55
-
56
- example = data.iloc[-16, :]
57
- print(f"Valueation for {example.instruction} \n\n\n {example.input}\n\n")
58
- evaluate(instruction = example.instruction,
59
- input = example.input)
60
-
 
18
  ### Evaluation part
19
 
20
 
21
+
22
+ ```python
23
+
24
+
25
  import pandas as pd
26
  import torch
27
  from torch.utils.data import AutTokenizer
 
31
  import pandas as pd
32
  import pickle
33
 
 
34
  MODEL_NAME: str = ''
35
 
36
 
 
49
  ### Input:
50
  {input}
51
  ### Response:"""
52
+
53
+ manual_instruction: str = "Napisz mi proszę jakie są rodzaje telefonów komórkowych"
54
+ manual_input: str = "Telefony komórkowe, w przeciwieństwie do np. satelitarnych, charakteryzuje to, że działają w obrębie naziemnych fal radiowych w technologii GSM (i w różnych jej wariantach: 3G, 4G czy niebawem 5G). Zasadniczo można jednak wyróżnić wiele ich rodzajów i podzielić je na różne kryteria. I tak, ze względu na rodzaj obudowy, można mówić o telefonach jednobryłowych, rozsuwanych, obrotowych czy też z klapką. Obecnie jednak najbardziej popularne i – ze względu na posiadane parametry – najlepsze telefony komórkowe to smartfony dotykowe."
55
+
56
+ print(f"Valueation for {manual_instruction} \n\n\n {manual_input}\n\n")
57
+ evaluate(instruction = manual_instruction,
58
+ input = manual_input)
59
+
60
+ ```