Update pipeline.py
Browse files- pipeline.py +0 -11
pipeline.py
CHANGED
@@ -1,14 +1,3 @@
|
|
1 |
-
'''
|
2 |
-
# upload model
|
3 |
-
import torch
|
4 |
-
from transformers import GPT2LMHeadModel,GPT2Tokenizer, GPT2Config
|
5 |
-
|
6 |
-
tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
|
7 |
-
model = torch.load('text_summary_4sets_2_550.pth', map_location=torch.device('mps'))
|
8 |
-
|
9 |
-
model.push_to_hub(repo_name="text-summary-gpt2-short", repo_id="Lin0He/text-summary-gpt2-short")
|
10 |
-
tokenizer.push_to_hub(repo_name="text-summary-gpt2-short", repo_id="Lin0He/text-summary-gpt2-short")
|
11 |
-
'''
|
12 |
import torch
|
13 |
import numpy as np
|
14 |
from typing import Dict, List, Any
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import torch
|
2 |
import numpy as np
|
3 |
from typing import Dict, List, Any
|