Spaces:
Runtime error
Runtime error
Commit
·
c417ff5
1
Parent(s):
2ac7665
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 |
-
torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8, inplace=True)
|
| 9 |
|
| 10 |
def paraphrase(model, text, max_length=128, num_return_sequences=5, num_beams=25, temperature=0.7):
|
| 11 |
input_ids = tokenizer(
|
|
|
|
| 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 |
+
# torch.quantization.quantize_dynamic(model, {torch.nn.Linear}, dtype=torch.qint8, inplace=True)
|
| 9 |
|
| 10 |
def paraphrase(model, text, max_length=128, num_return_sequences=5, num_beams=25, temperature=0.7):
|
| 11 |
input_ids = tokenizer(
|