hakim commited on
Commit
5afaf1e
1 Parent(s): b33a881

app updated

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,10 +10,10 @@ class PredictionPipeline:
10
  self.config = ConfigurationManager().get_model_evaluation_config()
11
 
12
  def predict(self,text):
13
- tokenizer = AutoTokenizer.from_pretrained(self.config.tokenizer_path)
14
  gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
15
 
16
- pipe = pipeline("summarization", model=self.config.model_path,tokenizer=tokenizer)
17
 
18
  print("Dialogue:")
19
  print(text)
 
10
  self.config = ConfigurationManager().get_model_evaluation_config()
11
 
12
  def predict(self,text):
13
+ tokenizer = AutoTokenizer.from_pretrained('tokenizer')
14
  gen_kwargs = {"length_penalty": 0.8, "num_beams":8, "max_length": 128}
15
 
16
+ pipe = pipeline("summarization", model='pegasus-samsum-model',tokenizer=tokenizer)
17
 
18
  print("Dialogue:")
19
  print(text)