Ilvir commited on
Commit
62cdd73
·
1 Parent(s): 444ca4b

Update gpt.py

Browse files
Files changed (1) hide show
  1. gpt.py +4 -1
gpt.py CHANGED
@@ -3,6 +3,9 @@ import streamlit as st
3
  import torch
4
  import textwrap
5
 
 
 
 
6
  tokenizer = GPT2Tokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
7
  model = GPT2LMHeadModel.from_pretrained(
8
  'sberbank-ai/rugpt3small_based_on_gpt2',
@@ -13,7 +16,7 @@ model = GPT2LMHeadModel.from_pretrained(
13
  model.load_state_dict(torch.load('modelgpt.pt', map_location=torch.device('cpu')))
14
 
15
 
16
- col1, col2, col3 = st.columns([9, 1, 9])
17
 
18
  with col1:
19
 
 
3
  import torch
4
  import textwrap
5
 
6
+
7
+ st.markdown('## Генерация текста GPT-моделью по пользовательскому prompt')
8
+
9
  tokenizer = GPT2Tokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
10
  model = GPT2LMHeadModel.from_pretrained(
11
  'sberbank-ai/rugpt3small_based_on_gpt2',
 
16
  model.load_state_dict(torch.load('modelgpt.pt', map_location=torch.device('cpu')))
17
 
18
 
19
+ col1, col2, col3 = st.columns([10, 5, 10])
20
 
21
  with col1:
22