snoop2head commited on
Commit
77a934c
โ€ข
1 Parent(s): 3569768

change height and switch emotion list

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  # -*- coding: utf-8 -*-
 
2
  import numpy as np
3
  import streamlit as st
4
  from transformers import AutoModelWithLMHead, PreTrainedTokenizerFast
@@ -52,7 +53,7 @@ st.write("์ขŒ์ธก์— ๊ฐ์ •์ƒํƒœ์˜ ๋ณ€ํ™”๋ฅผ ์ฃผ๊ณ , CTRL+Enter(CMD+Enter)๋ฅผ
52
 
53
  # text and sidebars
54
  default_value = "์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚  ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š”"
55
- sent = st.text_area("Text", default_value, max_chars=30, height=275)
56
  max_length = st.sidebar.slider("์ƒ์„ฑ ๋ฌธ์žฅ ๊ธธ์ด๋ฅผ ์„ ํƒํ•ด์ฃผ์„ธ์š”!", min_value=42, max_value=64)
57
  temperature = st.sidebar.slider(
58
  "Temperature", value=0.9, min_value=0.0, max_value=1.0, step=0.05
@@ -65,6 +66,7 @@ print("slider sidebars rendering completed")
65
  # make input sentence
66
  emotion_list = ["ํ–‰๋ณต", "์ค‘๋ฆฝ", "๋ถ„๋…ธ", "ํ˜์˜ค", "๋†€๋žŒ", "์Šฌํ””", "๊ณตํฌ"]
67
  main_emotion = st.sidebar.radio("์ฃผ์š” ๊ฐ์ •์„ ์„ ํƒํ•˜์„ธ์š”", emotion_list)
 
68
  sub_emotion = st.sidebar.radio("๋‘ ๋ฒˆ์งธ ๊ฐ์ •์„ ์„ ํƒํ•˜์„ธ์š”", emotion_list)
69
 
70
  print("radio sidebars rendering completed")
 
1
  # -*- coding: utf-8 -*-
2
+ import random
3
  import numpy as np
4
  import streamlit as st
5
  from transformers import AutoModelWithLMHead, PreTrainedTokenizerFast
 
53
 
54
  # text and sidebars
55
  default_value = "์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚  ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š”"
56
+ sent = st.text_area("Text", default_value, max_chars=30, height=50)
57
  max_length = st.sidebar.slider("์ƒ์„ฑ ๋ฌธ์žฅ ๊ธธ์ด๋ฅผ ์„ ํƒํ•ด์ฃผ์„ธ์š”!", min_value=42, max_value=64)
58
  temperature = st.sidebar.slider(
59
  "Temperature", value=0.9, min_value=0.0, max_value=1.0, step=0.05
 
66
  # make input sentence
67
  emotion_list = ["ํ–‰๋ณต", "์ค‘๋ฆฝ", "๋ถ„๋…ธ", "ํ˜์˜ค", "๋†€๋žŒ", "์Šฌํ””", "๊ณตํฌ"]
68
  main_emotion = st.sidebar.radio("์ฃผ์š” ๊ฐ์ •์„ ์„ ํƒํ•˜์„ธ์š”", emotion_list)
69
+ random.shuffle(emotion_list)
70
  sub_emotion = st.sidebar.radio("๋‘ ๋ฒˆ์งธ ๊ฐ์ •์„ ์„ ํƒํ•˜์„ธ์š”", emotion_list)
71
 
72
  print("radio sidebars rendering completed")