matthew chung commited on
Commit
8d6f2ec
1 Parent(s): d9089e8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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("“FINDINGS: There is bilateral narrowing the femoral tibial joint mild on the right moderate on the left. There is scalloping of the lateral tibial plateau of the left knee with small subchondral cysts and sclerosis as well as lateral degenerative osteophyte formation. There is mild narrowing of the right patellofemoral joint and moderate narrowing of the left. Degenerative osteophytes arises from the posterior inferior margin of the left patella. There is a large well corticated 2.5 cm calcification adjacent to the anterior tibial tubercle of the proximal right tibia. There is no joint effusion. The soft tissues are normal. Mild scattered vascular calcifications are noted involving the distal left superficial femoral and popliteal arteries.” ->: ", 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)
 
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)