updated app.py to use the peft adapter from huggingface's model repo
Browse files
app.py
CHANGED
|
@@ -20,12 +20,10 @@ def load_model_once():
|
|
| 20 |
device_map="auto"
|
| 21 |
)
|
| 22 |
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
# "./path-to-your-adapter" # Upload your wandb artifact files here
|
| 28 |
-
# )
|
| 29 |
return model, tokenizer
|
| 30 |
|
| 31 |
def summarize_text(text):
|
|
|
|
| 20 |
device_map="auto"
|
| 21 |
)
|
| 22 |
|
| 23 |
+
model = PeftModel.from_pretrained(
|
| 24 |
+
base_model,
|
| 25 |
+
"reydeuss/trustify-t5-adapter",
|
| 26 |
+
)
|
|
|
|
|
|
|
| 27 |
return model, tokenizer
|
| 28 |
|
| 29 |
def summarize_text(text):
|