Spaces:
Runtime error
Runtime error
snoop2head
commited on
Commit
โข
77a934c
1
Parent(s):
3569768
change height and switch emotion list
Browse files
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=
|
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")
|