Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,10 +16,10 @@ import os
|
|
| 16 |
|
| 17 |
tokenizer = T5Tokenizer.from_pretrained("AfnanAl/mT5small-ArabicSummary")
|
| 18 |
|
| 19 |
-
model_name="AfnanAl/mT5small-ArabicSummary"
|
| 20 |
custom_output_path="AfnanAl/summaryAonnx"
|
| 21 |
#modelO = quantize("AfnanAl/summaryAonnx")
|
| 22 |
-
modelO=get_onnx_model(
|
| 23 |
modelO.config.max_length=512
|
| 24 |
def summaryA(Text):
|
| 25 |
tokenized_text = tokenizer.encode(Text,return_tensors="pt")
|
|
|
|
| 16 |
|
| 17 |
tokenizer = T5Tokenizer.from_pretrained("AfnanAl/mT5small-ArabicSummary")
|
| 18 |
|
| 19 |
+
#model_name="AfnanAl/mT5small-ArabicSummary"
|
| 20 |
custom_output_path="AfnanAl/summaryAonnx"
|
| 21 |
#modelO = quantize("AfnanAl/summaryAonnx")
|
| 22 |
+
modelO=get_onnx_model(custom_output_path)
|
| 23 |
modelO.config.max_length=512
|
| 24 |
def summaryA(Text):
|
| 25 |
tokenized_text = tokenizer.encode(Text,return_tensors="pt")
|