Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
25 |
|
26 |
checkpoint = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization"
|
27 |
model = PeftModel.from_pretrained(model, checkpoint)
|
28 |
-
model = model.merge_and_unload()
|
29 |
|
30 |
class Person(BaseModel):
|
31 |
life_style: str
|
@@ -116,7 +116,7 @@ def summarize(text):
|
|
116 |
]
|
117 |
|
118 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
119 |
-
return response
|
120 |
|
121 |
with gr.Blocks() as demo:
|
122 |
gr.Markdown("## π Structured Information Extraction for Clinical Reports")
|
|
|
25 |
|
26 |
checkpoint = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization"
|
27 |
model = PeftModel.from_pretrained(model, checkpoint)
|
28 |
+
# model = model.merge_and_unload()
|
29 |
|
30 |
class Person(BaseModel):
|
31 |
life_style: str
|
|
|
116 |
]
|
117 |
|
118 |
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
119 |
+
return response
|
120 |
|
121 |
with gr.Blocks() as demo:
|
122 |
gr.Markdown("## π Structured Information Extraction for Clinical Reports")
|