Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
|
6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("VietAI/vit5-base")
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-base")
|
9 |
-
model_file = hf_hub_download(repo_id="tuongvxx1/medBot", filename="
|
10 |
state_dict = torch.load(model_file, map_location=torch.device('cpu'))
|
11 |
model.load_state_dict(new_state_dict)
|
12 |
model.to(device)
|
|
|
6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
7 |
tokenizer = AutoTokenizer.from_pretrained("VietAI/vit5-base")
|
8 |
model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-base")
|
9 |
+
model_file = hf_hub_download(repo_id="tuongvxx1/medBot", filename="medicalBot_ver4_2.pth")
|
10 |
state_dict = torch.load(model_file, map_location=torch.device('cpu'))
|
11 |
model.load_state_dict(new_state_dict)
|
12 |
model.to(device)
|