Spaces:
Runtime error
Runtime error
lilingxi01
commited on
Commit
•
cd78976
1
Parent(s):
4ae1cd4
[UI] Put more informations on the page.
Browse files
app.py
CHANGED
@@ -17,18 +17,19 @@ if not has_prepared:
|
|
17 |
has_prepared = True
|
18 |
|
19 |
st.markdown("""
|
20 |
-
<center><h2 style="padding-top: 0px; padding-bottom:
|
21 |
-
<center><
|
22 |
-
<center><h6><b>It knows exactly when you are calling it.</b></h6></center>
|
23 |
<br/>
|
24 |
""", unsafe_allow_html=True)
|
25 |
|
26 |
livedemo_col1, livedemo_col2, livedemo_col3 = st.columns([12,1,6])
|
27 |
|
28 |
with livedemo_col1:
|
29 |
-
st.
|
|
|
|
|
30 |
|
31 |
-
with st.form("
|
32 |
entity = st.text_input('Entity Name:', 'Jimmy')
|
33 |
sentence = st.text_input('Sentence Input:', 'Are you feeling good, Jimmy?',
|
34 |
help='The classifier is going to analyze this sentence.')
|
@@ -49,6 +50,30 @@ with livedemo_col1:
|
|
49 |
elif st.session_state['running_status'] == STATUS_ERROR:
|
50 |
st.warning('The entity name is not in the sentence!')
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
with livedemo_col2:
|
53 |
st.empty()
|
54 |
|
@@ -58,14 +83,25 @@ with livedemo_col3:
|
|
58 |
""")
|
59 |
st.markdown("""
|
60 |
Hi! I'm the Entity Referring Classifier.
|
61 |
-
|
62 |
""")
|
|
|
63 |
st.markdown("""
|
64 |
-
####
|
65 |
""")
|
66 |
st.markdown("""
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
""")
|
69 |
st.markdown("""
|
70 |
-
|
|
|
|
|
71 |
""")
|
|
|
17 |
has_prepared = True
|
18 |
|
19 |
st.markdown("""
|
20 |
+
<center><h2 style="padding-top: 0px; padding-bottom: 8px;">Entity Referring Classifier</h2></center>
|
21 |
+
<center><h6 style="color: #bfbfbf"><b>It knows exactly when you are calling it.</b></h6></center>
|
|
|
22 |
<br/>
|
23 |
""", unsafe_allow_html=True)
|
24 |
|
25 |
livedemo_col1, livedemo_col2, livedemo_col3 = st.columns([12,1,6])
|
26 |
|
27 |
with livedemo_col1:
|
28 |
+
st.markdown("""
|
29 |
+
<h3>Live Demo <small style="font-size:12px; color: #cfcfcf">version 2.0.1.1208</small></h3>
|
30 |
+
""", unsafe_allow_html=True)
|
31 |
|
32 |
+
with st.form("live_demo_form"):
|
33 |
entity = st.text_input('Entity Name:', 'Jimmy')
|
34 |
sentence = st.text_input('Sentence Input:', 'Are you feeling good, Jimmy?',
|
35 |
help='The classifier is going to analyze this sentence.')
|
|
|
50 |
elif st.session_state['running_status'] == STATUS_ERROR:
|
51 |
st.warning('The entity name is not in the sentence!')
|
52 |
|
53 |
+
st.markdown("""
|
54 |
+
#### Corpus
|
55 |
+
""")
|
56 |
+
st.markdown("""
|
57 |
+
<small style="font-size: 19px; padding-bottom: 6px;"><b><code>Calling</code></b></small>
|
58 |
+
means that the sentence contains the name and is telling to the entity.<br/>
|
59 |
+
<small style="color: #afafaf">
|
60 |
+
<b><i>Examples:</i></b><br/>
|
61 |
+
<b>-</b> Are you feeling good about it Jimmy?<br/>
|
62 |
+
<b>-</b> Are you feeling good Jimmy?<br/>
|
63 |
+
<b>-</b> Jimmy you are so cool!
|
64 |
+
</small>
|
65 |
+
""", unsafe_allow_html=True)
|
66 |
+
st.markdown("""
|
67 |
+
<small style="font-size: 19px; padding-bottom: 6px;"><b><code>Mentioning</code></b></small>
|
68 |
+
means that the sentence contains the name but is telling to other person.<br/>
|
69 |
+
<small style="color: #afafaf">
|
70 |
+
<b><i>Examples:</i></b><br/>
|
71 |
+
<b>-</b> Are you feeling good about Jimmy?<br/>
|
72 |
+
<b>-</b> Have you heard about Jimmy?<br/>
|
73 |
+
<b>-</b> Jimmy said that you are so cool!
|
74 |
+
</small>
|
75 |
+
""", unsafe_allow_html=True)
|
76 |
+
|
77 |
with livedemo_col2:
|
78 |
st.empty()
|
79 |
|
|
|
83 |
""")
|
84 |
st.markdown("""
|
85 |
Hi! I'm the Entity Referring Classifier.
|
86 |
+
Specify an entity name, and then type a sentence to get started!
|
87 |
""")
|
88 |
+
|
89 |
st.markdown("""
|
90 |
+
#### Background
|
91 |
""")
|
92 |
st.markdown("""
|
93 |
+
There are a lot of voice assistants and bots out there,
|
94 |
+
but they all need a specific prefix to wake them like “hey siri” or “hey alexa”.
|
95 |
+
At our real world, nobody is communicating with others with such prefix all the time.
|
96 |
+
Everyone should be able to communicate in a comfortable way including with bots and virtual assistants.
|
97 |
+
Our aim here is to get rid of the "wake phrase".
|
98 |
+
""")
|
99 |
+
|
100 |
+
st.markdown("""
|
101 |
+
#### Applications
|
102 |
""")
|
103 |
st.markdown("""
|
104 |
+
Developers can apply it on their virtual bots or voice assistants to detect
|
105 |
+
if the user is calling the bot or just mentioning the bot rather than detecting a fixed wake-up phrase.
|
106 |
+
It will improve the human-computer interaction and usability.
|
107 |
""")
|