bertugmirasyedi commited on
Commit
cdf75a8
·
1 Parent(s): 6b67b82

Change the location of summarization model

Browse files
Files changed (1) hide show
  1. search.py +4 -3
search.py CHANGED
@@ -209,14 +209,15 @@ def search(query, similarity=False):
209
 
210
  # Define the summarizer model and tokenizer
211
  sum_tokenizer = AutoTokenizer.from_pretrained("lidiya/bart-base-samsum")
212
- sum_model_quantized = ORTModelForSeq2SeqLM.from_pretrained(
213
  "trainers/bart-base-samsum-quantized"
214
  )
215
  # sum_model = AutoModelForSeq2SeqLM.from_pretrained("sshleifer/distilbart-xsum-12-6")
 
216
 
217
- summarizer_pipeline = optimum_pipeline(
218
  "summarization",
219
- model=sum_model_quantized,
220
  tokenizer=sum_tokenizer,
221
  batch_size=64,
222
  )
 
209
 
210
  # Define the summarizer model and tokenizer
211
  sum_tokenizer = AutoTokenizer.from_pretrained("lidiya/bart-base-samsum")
212
+ #sum_model_quantized = ORTModelForSeq2SeqLM.from_pretrained(
213
  "trainers/bart-base-samsum-quantized"
214
  )
215
  # sum_model = AutoModelForSeq2SeqLM.from_pretrained("sshleifer/distilbart-xsum-12-6")
216
+ sum_model = AutoModelForSeq2SeqLM.from_pretrained("lidiya/bart-base-samsum")
217
 
218
+ summarizer_pipeline = pipeline(
219
  "summarization",
220
+ model=sum_model,
221
  tokenizer=sum_tokenizer,
222
  batch_size=64,
223
  )