Spaces:
Runtime error
Runtime error
Commit
·
7c8f24b
1
Parent(s):
081a970
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained('humarin/chatgpt_paraphraser_on_T5_base', cache_dir='./Models')
|
| 7 |
model = AutoModelForSeq2SeqLM.from_pretrained('humarin/chatgpt_paraphraser_on_T5_base', cache_dir='./Models')
|
| 8 |
-
|
| 9 |
|
| 10 |
def paraphrase(
|
| 11 |
text,
|
|
|
|
| 5 |
|
| 6 |
tokenizer = AutoTokenizer.from_pretrained('humarin/chatgpt_paraphraser_on_T5_base', cache_dir='./Models')
|
| 7 |
model = AutoModelForSeq2SeqLM.from_pretrained('humarin/chatgpt_paraphraser_on_T5_base', cache_dir='./Models')
|
| 8 |
+
model = torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8)
|
| 9 |
|
| 10 |
def paraphrase(
|
| 11 |
text,
|