Instructions to use SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune") model = AutoModel.from_pretrained("SEBIS/code_trans_t5_large_code_documentation_generation_php_transfer_learning_finetune") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
tags:
|
| 3 |
- summarization
|
| 4 |
widget:
|
| 5 |
-
- text: "
|
| 6 |
|
| 7 |
---
|
| 8 |
|
|
@@ -33,7 +33,7 @@ pipeline = SummarizationPipeline(
|
|
| 33 |
device=0
|
| 34 |
)
|
| 35 |
|
| 36 |
-
tokenized_code = "
|
| 37 |
pipeline([tokenized_code])
|
| 38 |
```
|
| 39 |
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/php/large_model.ipynb).
|
|
|
|
| 2 |
tags:
|
| 3 |
- summarization
|
| 4 |
widget:
|
| 5 |
+
- text: "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
|
| 6 |
|
| 7 |
---
|
| 8 |
|
|
|
|
| 33 |
device=0
|
| 34 |
)
|
| 35 |
|
| 36 |
+
tokenized_code = "public static function update ( $ table ) { if ( ! is_array ( $ table ) ) { $ table = json_decode ( $ table , true ) ; } if ( ! SchemaManager :: tableExists ( $ table [ 'oldName' ] ) ) { throw SchemaException :: tableDoesNotExist ( $ table [ 'oldName' ] ) ; } $ updater = new self ( $ table ) ; $ updater -> updateTable ( ) ; }"
|
| 37 |
pipeline([tokenized_code])
|
| 38 |
```
|
| 39 |
Run this example in [colab notebook](https://github.com/agemagician/CodeTrans/blob/main/prediction/transfer%20learning%20fine-tuning/function%20documentation%20generation/php/large_model.ipynb).
|