Concepta commited on
Commit
d20c3c3
1 Parent(s): 08ca67b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -4,11 +4,13 @@ from transformers import BloomTokenizerFast
4
  from transformers import pipeline, set_seed
5
  import random
6
 
7
- model_name = "bloom-560m"
8
  #for RAG: stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1
9
  #for tts: rhaymison/transcription-portuguese-legal-whisper-peft
10
- model = AutoModelForCausalLM.from_pretrained(f'jslin09/{model_name}-finetuned-fraud')
11
- tokenizer = BloomTokenizerFast.from_pretrained(f'bigscience/{model_name}', bos_token = '<s>', eos_token = '</s>', pad_token = '<pad>')
 
 
12
 
13
  def rnd_generate(prompt):
14
  rnd_seed = random.randint(10, 500)
 
4
  from transformers import pipeline, set_seed
5
  import random
6
 
7
+ #model_name = "bloom-560m"
8
  #for RAG: stjiris/bert-large-portuguese-cased-legal-mlm-nli-sts-v1
9
  #for tts: rhaymison/transcription-portuguese-legal-whisper-peft
10
+ model_name = MBZUAI/LaMini-T5-738M
11
+ model = AutoModelForSeq2SeqLM.from_pretrained(f'{model_name}')
12
+ #tokenizer = BloomTokenizerFast.from_pretrained(f'{model_name}', bos_token = '<s>', eos_token = '</s>', pad_token = '<pad>')
13
+ tokenizer = AutoTokenizer.from_pretrained(f'{model_name}')
14
 
15
  def rnd_generate(prompt):
16
  rnd_seed = random.randint(10, 500)