Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def load_gpt2():
|
|
22 |
@st.cache_resource
|
23 |
def load_custom_model():
|
24 |
# Здесь замените путь на вашу кастомную модель
|
25 |
-
model_custom = GPT2LMHeadModel.from_pretrained("./rus_gpt2_tuned", from_tf=False, use_safetensors=True)
|
26 |
tokenizer_custom = GPT2TokenizerFast.from_pretrained("./rus_gpt2_tuned")
|
27 |
return model_custom, tokenizer_custom
|
28 |
|
|
|
22 |
@st.cache_resource
|
23 |
def load_custom_model():
|
24 |
# Здесь замените путь на вашу кастомную модель
|
25 |
+
model_custom = GPT2LMHeadModel.from_pretrained("./rus_gpt2_tuned", from_tf=False, use_safetensors=True)
|
26 |
tokenizer_custom = GPT2TokenizerFast.from_pretrained("./rus_gpt2_tuned")
|
27 |
return model_custom, tokenizer_custom
|
28 |
|