d.tsimerman commited on
Commit
b1afa16
1 Parent(s): af03eb1

fix context

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -4,7 +4,7 @@ import transformers
4
  import torch
5
  from typing import List, Dict
6
 
7
-
8
  model_name = st.selectbox(
9
  'Выберите модель',
10
  ('tinkoff-ai/crossencoder-tiny', 'tinkoff-ai/crossencoder-medium', 'tinkoff-ai/crossencoder-large')
@@ -15,15 +15,14 @@ model = transformers.AutoModelForSequenceClassification.from_pretrained(model_na
15
  if torch.cuda.is_available():
16
  model = model.cuda()
17
 
18
- st.header('Эта демонстрация позволяет поэксперементировать с моделями, которые оценивают, насколько подходит предлагаемый ответ к контексту диалога')
19
  context_3 = 'Привет'
20
  context_2 = 'Здарова'
21
  context_1 = 'Ну рассказывай, как у тебя дела?'
22
 
23
- st.markdown('👱🏻‍♀️ *Настя*: ' + context_3)
24
- st.markdown('🤖 *Диалоговый агент*: ' + context_2)
25
- st.markdown('👱🏻‍♀️ *Настя*: ' + context_1)
26
- response = st.text_input('🤖 Диалоговый агент:', 'Норм')
27
  sample = {
28
  'context_3': context_3,
29
  'context_2': context_2,
4
  import torch
5
  from typing import List, Dict
6
 
7
+ st.header('Эта демонстрация позволяет поэксперементировать с моделями, которые оценивают, насколько подходит предлагаемый ответ к контексту диалога')
8
  model_name = st.selectbox(
9
  'Выберите модель',
10
  ('tinkoff-ai/crossencoder-tiny', 'tinkoff-ai/crossencoder-medium', 'tinkoff-ai/crossencoder-large')
15
  if torch.cuda.is_available():
16
  model = model.cuda()
17
 
 
18
  context_3 = 'Привет'
19
  context_2 = 'Здарова'
20
  context_1 = 'Ну рассказывай, как у тебя дела?'
21
 
22
+ st.markdown('👱🏻‍♀️ **Настя**: ' + context_3)
23
+ st.markdown('🤖 **Диалоговый агент(*: ' + context_2)
24
+ st.markdown('👱🏻‍♀️ **Настя**: ' + context_1)
25
+ response = st.text_input('🤖 **Диалоговый агент**:', 'Норм')
26
  sample = {
27
  'context_3': context_3,
28
  'context_2': context_2,