Spaces:
Sleeping
Sleeping
Update app.py
Browse files125 unmodified lines126127128129130131132125 unmodified linesname = name[7:]new_state_dict[name] = vmodel.load_state_dict(new_state_dict)# --- ์์ ๋ ํต์ฌ ๋ถ๋ถ ๋ ---model.to(device) # ๋ชจ๋ธ์ ๋๋ฐ์ด์ค๋ก ์ด๋125 unmodified lines126127128129130131132133134135125 unmodified linesname = name[7:]new_state_dict[name] = v# strict=False๋ฅผ ์ฌ์ฉํ์ฌ Missing key(s) ์ค๋ฅ๋ฅผ ๋ฐฉ์งํฉ๋๋ค.# ์ด๋ new_state_dict์ ์๋ ํค๋ ๋ชจ๋ธ์์ ๊ธฐ์กด ๊ฐ(from_pretrained๋ก ๋ก๋๋)์ ์ ์งํ๊ณ ,# ๋ชจ๋ธ์ ์๋ ํค๋ ๋ฌด์ํ๋๋ก ํฉ๋๋ค.model.load_state_dict(new_state_dict, strict=False)# --- ์์ ๋ ํต์ฌ ๋ถ๋ถ ๋ ---model.to(device) # ๋ชจ๋ธ์ ๋๋ฐ์ด์ค๋ก ์ด๋
app.py+4-1