Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,8 +9,14 @@ import os
|
|
| 9 |
#import gdown
|
| 10 |
#url = 'https://drive.google.com/drive/folders/135hTTURfjn43fo4f?usp=sharing' # I'm showing a fake token
|
| 11 |
#gdown.download_folder(url)
|
| 12 |
-
os.system("install
|
| 13 |
-
os.system("git clone https://huggingface.co/AfnanAl/summaryAonnx")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
#m=os.system("gdown https://drive.google.com/file/d/152leR0f_2RXIVyZxV1ZYDpRMMYYGBhOk/view?usp=sharing")
|
| 16 |
|
|
@@ -23,7 +29,7 @@ custom_output_path="summaryAonnx/"
|
|
| 23 |
|
| 24 |
#print(quantized_model)
|
| 25 |
#modelO = quantize("AfnanAl/summaryAonnx")
|
| 26 |
-
modelO=get_onnx_model(model_name, custom_output_path
|
| 27 |
modelO.config.max_length=512
|
| 28 |
def summaryA(Text):
|
| 29 |
tokenized_text = tokenizer.encode(Text,return_tensors="pt")
|
|
|
|
| 9 |
#import gdown
|
| 10 |
#url = 'https://drive.google.com/drive/folders/135hTTURfjn43fo4f?usp=sharing' # I'm showing a fake token
|
| 11 |
#gdown.download_folder(url)
|
| 12 |
+
os.system("pip install huggingface_hub")
|
| 13 |
+
#os.system("git clone https://huggingface.co/AfnanAl/summaryAonnx")
|
| 14 |
+
|
| 15 |
+
from huggingface_hub import Repository
|
| 16 |
+
repo = Repository(
|
| 17 |
+
local_dir = 'summaryAonnx',
|
| 18 |
+
clone_from='AfnanAl/summaryAonnx'
|
| 19 |
+
)
|
| 20 |
|
| 21 |
#m=os.system("gdown https://drive.google.com/file/d/152leR0f_2RXIVyZxV1ZYDpRMMYYGBhOk/view?usp=sharing")
|
| 22 |
|
|
|
|
| 29 |
|
| 30 |
#print(quantized_model)
|
| 31 |
#modelO = quantize("AfnanAl/summaryAonnx")
|
| 32 |
+
modelO=get_onnx_model(model_name, custom_output_path)
|
| 33 |
modelO.config.max_length=512
|
| 34 |
def summaryA(Text):
|
| 35 |
tokenized_text = tokenizer.encode(Text,return_tensors="pt")
|