AfnanAl commited on
Commit
b295c2f
1 Parent(s): c62a8ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -9,17 +9,19 @@ 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("pip install gdown")
 
 
13
  #m=os.system("gdown https://drive.google.com/file/d/152leR0f_2RXIVyZxV1ZYDpRMMYYGBhOk/view?usp=sharing")
14
 
15
  #os.system("unzip 'summary-T5_v6.zip'")
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")
 
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("sudo apt-get install git-lfs")
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
 
17
  #os.system("unzip 'summary-T5_v6.zip'")
18
 
19
  tokenizer = T5Tokenizer.from_pretrained("AfnanAl/mT5small-ArabicSummary")
20
 
21
+ model_name="AfnanAl/mT5small-ArabicSummary"
22
+ custom_output_path="summaryAonnx/"
23
  #modelO = quantize("AfnanAl/summaryAonnx")
24
+ modelO=get_onnx_model(model_name, custom_output_path)
25
  modelO.config.max_length=512
26
  def summaryA(Text):
27
  tokenized_text = tokenizer.encode(Text,return_tensors="pt")