khashei commited on
Commit
8bf8807
1 Parent(s): f766295

updated model name

Browse files
Files changed (2) hide show
  1. .vscode/settings.json +7 -0
  2. README.md +3 -3
.vscode/settings.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "workbench.colorCustomizations": {
3
+ "activityBar.background": "#0F3332",
4
+ "titleBar.activeBackground": "#144746",
5
+ "titleBar.activeForeground": "#F5FCFC"
6
+ }
7
+ }
README.md CHANGED
@@ -12,15 +12,15 @@ Bolbol-zaban/gpt2-persian is gpt2 language model that is trained with hyper para
12
  3. The training dataset only include Persian text. All non-persian characters are replaced with especial tokens (e.g [LAT], [URL], [NUM])
13
 
14
  Please refer to this [blog post](https://medium.com/@khashei/a-not-so-dangerous-ai-in-the-persian-language-39172a641c84) for further detail.
15
- Also try the model [here](https://huggingface.co/Bolbol-zaban/gpt2-persian?text=%D8%AF%D8%B1+%DB%8C%DA%A9+%D8%A7%D8%AA%D9%81%D8%A7%D9%82+%D8%B4%DA%AF%D9%81%D8%AA+%D8%A7%D9%86%DA%AF%DB%8C%D8%B2%D8%8C+%D9%BE%DA%98%D9%88%D9%87%D8%B4%DA%AF%D8%B1%D8%A7%D9%86) or on [Bolbolzaban.com](http://www.bolbolzaban.com/text).
16
 
17
  ## How to use
18
  You can use this model directly with a pipeline for text generation:
19
 
20
  ```python
21
  from transformers import pipeline, AutoTokenizer, GPT2LMHeadModel
22
- tokenizer = AutoTokenizer.from_pretrained('Bolbol-zaban/gpt2-persian')
23
- model = GPT2LMHeadModel.from_pretrained('Bolbol-zaban/gpt2-persian')
24
  generator = pipeline('text-generation', model, tokenizer=tokenizer, config={'max_length':256})
25
  sample = generator('در یک اتفاق شگفت انگیز، پژوهشگران')
26
  ```
 
12
  3. The training dataset only include Persian text. All non-persian characters are replaced with especial tokens (e.g [LAT], [URL], [NUM])
13
 
14
  Please refer to this [blog post](https://medium.com/@khashei/a-not-so-dangerous-ai-in-the-persian-language-39172a641c84) for further detail.
15
+ Also try the model [here](https://huggingface.co/bolbolzaban/gpt2-persian?text=%D8%AF%D8%B1+%DB%8C%DA%A9+%D8%A7%D8%AA%D9%81%D8%A7%D9%82+%D8%B4%DA%AF%D9%81%D8%AA+%D8%A7%D9%86%DA%AF%DB%8C%D8%B2%D8%8C+%D9%BE%DA%98%D9%88%D9%87%D8%B4%DA%AF%D8%B1%D8%A7%D9%86) or on [Bolbolzaban.com](http://www.bolbolzaban.com/text).
16
 
17
  ## How to use
18
  You can use this model directly with a pipeline for text generation:
19
 
20
  ```python
21
  from transformers import pipeline, AutoTokenizer, GPT2LMHeadModel
22
+ tokenizer = AutoTokenizer.from_pretrained('bolbolzaban/gpt2-persian')
23
+ model = GPT2LMHeadModel.from_pretrained('bolbolzaban/gpt2-persian')
24
  generator = pipeline('text-generation', model, tokenizer=tokenizer, config={'max_length':256})
25
  sample = generator('در یک اتفاق شگفت انگیز، پژوهشگران')
26
  ```