Emil25 commited on
Commit
4e2b617
·
1 Parent(s): 2ee956d

Update pages/Visualization.py

Browse files
Files changed (1) hide show
  1. pages/Visualization.py +13 -16
pages/Visualization.py CHANGED
@@ -32,21 +32,18 @@ image_idea = st.text_input('Предложите свою тему для ген
32
  image_gen__btn = st.button('Генерировать изображение')
33
  if image_gen__btn:
34
  with st.spinner('...'):
35
- try:
36
- image_bytes = generate_img({"inputs": image_idea})
37
- image_raw = io.BytesIO(image_bytes)
38
- st.success('Готово')
39
- st.image(image_raw)
40
- st.markdown('## Опишите фотографию на английском языке')
41
- st.markdown('## План ответа поможет вам:')
42
- st.markdown('+ the place;')
43
- st.markdown('+ the action;')
44
- st.markdown('+ the person’s appearance;')
45
- st.markdown('+ whether you like the picture or not;')
46
- st.markdown('+ why.')
47
- st.markdown('Start with: “I’d like to describe this picture. The picture shows …” ')
48
- except UnidentifiedImageError:
49
- st.warning('This is a warning', icon="⚠️")
50
-
51
 
52
  st.divider()
 
32
  image_gen__btn = st.button('Генерировать изображение')
33
  if image_gen__btn:
34
  with st.spinner('...'):
35
+ image_bytes = generate_img({"inputs": image_idea})
36
+ image_raw = io.BytesIO(image_bytes)
37
+ st.success('Готово')
38
+ st.image(image_raw)
39
+ st.markdown('## Опишите фотографию на английском языке')
40
+ st.markdown('## План ответа поможет вам:')
41
+ st.markdown('+ the place;')
42
+ st.markdown('+ the action;')
43
+ st.markdown('+ the person’s appearance;')
44
+ st.markdown('+ whether you like the picture or not;')
45
+ st.markdown('+ why.')
46
+ st.markdown('Start with: “I’d like to describe this picture. The picture shows …” ')
47
+
 
 
 
48
 
49
  st.divider()