Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
11 |
-
|
|
|
|
|
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)
|