matthew chung
commited on
Commit
•
8d6f2ec
1
Parent(s):
d9089e8
Update app.py
Browse files
app.py
CHANGED
@@ -28,12 +28,12 @@ tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-7b1")
|
|
28 |
# # Load the Lora model
|
29 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
30 |
|
31 |
-
text = st.text_area('enter text')
|
32 |
|
33 |
if text:
|
34 |
|
35 |
start_time = time.time()
|
36 |
-
batch = tokenizer(
|
37 |
output_tokens = model.generate(**batch, max_new_tokens=25)
|
38 |
|
39 |
out = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|
|
|
28 |
# # Load the Lora model
|
29 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
30 |
|
31 |
+
text = st.text_area('enter text in this format : “<<report>>” ->: ')
|
32 |
|
33 |
if text:
|
34 |
|
35 |
start_time = time.time()
|
36 |
+
batch = tokenizer(text, return_tensors='pt')
|
37 |
output_tokens = model.generate(**batch, max_new_tokens=25)
|
38 |
|
39 |
out = tokenizer.decode(output_tokens[0], skip_special_tokens=True)
|