storresbusquets commited on
Commit
654d03b
1 Parent(s): 3714046

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -49,8 +49,8 @@ class GradioInference:
49
  self.tokenizer = AutoTokenizer.from_pretrained("csebuetnlp/mT5_multilingual_XLSum")
50
  self.model = AutoModelForSeq2SeqLM.from_pretrained("csebuetnlp/mT5_multilingual_XLSum")
51
 
52
-
53
- self.llm = CTransformers(model="TheBloke/Llama-2-7B-Chat-GGML", model_file = 'llama-2-7b-chat.ggmlv3.q2_K.bin', callbacks=[StreamingStdOutCallbackHandler()])
54
 
55
 
56
  def __call__(self, link, lang, size, progress=gr.Progress()):
 
49
  self.tokenizer = AutoTokenizer.from_pretrained("csebuetnlp/mT5_multilingual_XLSum")
50
  self.model = AutoModelForSeq2SeqLM.from_pretrained("csebuetnlp/mT5_multilingual_XLSum")
51
 
52
+ self.config = {'max_new_tokens': 128, 'repetition_penalty': 1.1, 'temperature':0}
53
+ self.llm = CTransformers(model="TheBloke/Llama-2-7B-Chat-GGML", model_file = 'llama-2-7b-chat.ggmlv3.q2_K.bin', config=self.config,callbacks=[StreamingStdOutCallbackHandler()])
54
 
55
 
56
  def __call__(self, link, lang, size, progress=gr.Progress()):