Spaces:
Runtime error
Runtime error
added weights
Browse files- pages/task3.py +4 -5
pages/task3.py
CHANGED
@@ -29,12 +29,11 @@ button_style = """
|
|
29 |
|
30 |
DEVICE = 'cpu'
|
31 |
|
32 |
-
# Загрузка пользовательской модели и токенизатора (замените на свои пути и модель)
|
33 |
-
# model_path = "sberbank-ai/rugpt3small_based_on_gpt2"
|
34 |
-
# tokenizer_path = "sberbank-ai/rugpt3small_based_on_gpt2"
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
38 |
|
39 |
st.markdown("""
|
40 |
<style>
|
|
|
29 |
|
30 |
DEVICE = 'cpu'
|
31 |
|
|
|
|
|
|
|
32 |
|
33 |
+
tokenizer_path = "sberbank-ai/rugpt3small_based_on_gpt2"
|
34 |
+
|
35 |
+
model = torch.load('srcs/gpt_weights.pth').to(DEVICE)
|
36 |
+
tokenizer = GPT2Tokenizer.from_pretrained(tokenizer_path)
|
37 |
|
38 |
st.markdown("""
|
39 |
<style>
|