harry-stark commited on
Commit
f665bf2
1 Parent(s): cd3a9d9

Refactor:Improved UI text

Browse files
Files changed (3) hide show
  1. .gitignore +1 -1
  2. app.py +2 -2
  3. examples.json +1 -1
.gitignore CHANGED
@@ -1,2 +1,2 @@
1
  /__pycache__
2
- zx.py
 
1
  /__pycache__
2
+ zx.py
app.py CHANGED
@@ -15,8 +15,8 @@ if __name__ == '__main__':
15
 
16
 
17
  with st.form(key='my_form'):
18
- text_input = st.text_area("Input Text",ex_text)
19
- labels = st.text_input('Possible topics (separated by `,`)',ex_labels, max_chars=1000)
20
  labels = list(set([x.strip() for x in labels.strip().split(',') if len(x.strip()) > 0]))
21
  radio = st.radio("Select Multiclass",('Only one topic can be corect at a time','Multiple topics can be correct at a time'),)
22
  multi_class= True if radio=="Multiple topics can be correct at a time" else False
 
15
 
16
 
17
  with st.form(key='my_form'):
18
+ text_input = st.text_area("Input any text you want to classify here:",ex_text)
19
+ labels = st.text_input('Write any topic keywords you are interested in here (separate different topics with a ","):',ex_labels, max_chars=1000)
20
  labels = list(set([x.strip() for x in labels.strip().split(',') if len(x.strip()) > 0]))
21
  radio = st.radio("Select Multiclass",('Only one topic can be corect at a time','Multiple topics can be correct at a time'),)
22
  multi_class= True if radio=="Multiple topics can be correct at a time" else False
examples.json CHANGED
@@ -1,4 +1,4 @@
1
  {
2
  "text":"The Democratic president had just signed into law the most significant infrastructure package in generations. And he had done it by bringing Democrats and Republicans together.",
3
- "labels":"'Economy', 'Politics', 'Environment', 'Entertainment'"
4
  }
 
1
  {
2
  "text":"The Democratic president had just signed into law the most significant infrastructure package in generations. And he had done it by bringing Democrats and Republicans together.",
3
+ "labels":"Economy,Politics,Environment,Entertainment"
4
  }