Casually commited on
Commit
ec2824d
1 Parent(s): 4cbd8c7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -25
README.md CHANGED
@@ -8,36 +8,39 @@ language: zh
8
 
9
  ## 介绍
10
  * **[PaddlePaddle/uie-micro](https://huggingface.co/PaddlePaddle/uie-medium)** 的 Pytorch 实现
11
-
12
  ## 代码调用
13
 
14
  ### forward
15
- > **Parameters**
16
- > * `input_ids: Optional[torch.Tensor] = None`
17
- > * `token_type_ids: Optional[torch.Tensor] = None`
18
- > * `position_ids: Optional[torch.Tensor] = None`
19
- > * `attention_mask: Optional[torch.Tensor] = None`
20
- > * `head_mask: Optional[torch.Tensor] = None`
21
- > * `inputs_embeds: Optional[torch.Tensor] = None`
22
- > * `start_positions: Optional[torch.Tensor] = None`
23
- > * `end_positions: Optional[torch.Tensor] = None`
24
- > * `output_attentions: Optional[bool] = None`
25
- > * `output_hidden_states: Optional[bool] = None`
26
- > * `return_dict: Optional[bool] = None`
27
- >
28
- > **Returns** *UIEModelOutput or tuple(torch.FloatTensor)*
 
 
29
 
30
  ### predict
31
- > **Parameters**
32
- > * `schema: Union[Dict, List[str], str]`
33
- > * `input_texts: Union[List[str], str]`
34
- > * `tokenizer: PreTrainedTokenizerFast`
35
- > * `max_length: int = 512`
36
- > * `batch_size: int = 32`
37
- > * `position_prob: int = 0.5`
38
- > * `progress_hook=None`
39
- >
40
- > **Returns** * List[Dict]*
 
 
41
 
42
  ```python
43
  from tqdm import tqdm
 
8
 
9
  ## 介绍
10
  * **[PaddlePaddle/uie-micro](https://huggingface.co/PaddlePaddle/uie-medium)** 的 Pytorch 实现
 
11
  ## 代码调用
12
 
13
  ### forward
14
+ #### *Parameters*
15
+ * `input_ids: Optional[torch.Tensor] = None`
16
+ * `token_type_ids: Optional[torch.Tensor] = None`
17
+ * `position_ids: Optional[torch.Tensor] = None`
18
+ * `attention_mask: Optional[torch.Tensor] = None`
19
+ * `head_mask: Optional[torch.Tensor] = None`
20
+ * `inputs_embeds: Optional[torch.Tensor] = None`
21
+ * `start_positions: Optional[torch.Tensor] = None`
22
+ * `end_positions: Optional[torch.Tensor] = None`
23
+ * `output_attentions: Optional[bool] = None`
24
+ * `output_hidden_states: Optional[bool] = None`
25
+ * `return_dict: Optional[bool] = None`
26
+
27
+ #### *Returns*
28
+
29
+ * `UIEModelOutput or tuple(torch.FloatTensor)`
30
 
31
  ### predict
32
+ #### *Parameters*
33
+ * `schema: Union[Dict, List[str], str]`
34
+ * `input_texts: Union[List[str], str]`
35
+ * `tokenizer: PreTrainedTokenizerFast`
36
+ * `max_length: int = 512`
37
+ * `batch_size: int = 32`
38
+ * `position_prob: int = 0.5`
39
+ * `progress_hook=None`
40
+
41
+ #### *Returns*
42
+ * `List[Dict]`
43
+
44
 
45
  ```python
46
  from tqdm import tqdm