Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -71,12 +71,12 @@ if __name__ == "__main__":
|
|
71 |
st.sidebar.image(img_short)
|
72 |
st.image(img_full)
|
73 |
st.title("VLT5 - Reason for Contact generator")
|
74 |
-
st.markdown("
|
75 |
-
st.markdown("
|
76 |
-
st.markdown("
|
77 |
-
st.markdown("
|
78 |
-
st.markdown("
|
79 |
-
st.markdown("
|
80 |
|
81 |
generated_rfc = ""
|
82 |
user_input = st.text_area(
|
@@ -99,10 +99,6 @@ if __name__ == "__main__":
|
|
99 |
result = st.button("Find reason for contact")
|
100 |
|
101 |
if result:
|
102 |
-
if mode == "Polish - RfC Generation (accepts whole conversation)":
|
103 |
-
text_area = "Put a whole conversation or full e-mail here."
|
104 |
-
elif mode == "Polish - RfC Detection (accepts one turn)":
|
105 |
-
text_area = "Put a single turn or a few sentences here."
|
106 |
generated_rfc = get_predictions(text=user_input, mode=mode)
|
107 |
-
st.text_area(
|
108 |
print(f"Input: {user_input} ---> Reason for contact: {generated_rfc}")
|
|
|
71 |
st.sidebar.image(img_short)
|
72 |
st.image(img_full)
|
73 |
st.title("VLT5 - Reason for Contact generator")
|
74 |
+
st.markdown("#### RfC Generation model.")
|
75 |
+
st.markdown("**Input***: Whole conversation. Should specify roles (e.g. *AGENT: Hello, how can I help you? CLIENT: Hi, I would like to report a stolen card.* Put a whole conversation or full e-mail here.")
|
76 |
+
st.markdown("**Output**: Reason for calling for the whole conversation.")
|
77 |
+
st.markdown("#### RfC Detection model.")
|
78 |
+
st.markdown("**Input**: A single turn from the conversation e.g. *'Hello, how can I help you?'* or *'Hi, I would like to report a stolen card.'. Put a single turn or a few sentences here.*")
|
79 |
+
st.markdown("**Output**: Model will return an empty string if a turn possibly does not includes Reason for Calling, or a sentence if the RfC is detected.")
|
80 |
|
81 |
generated_rfc = ""
|
82 |
user_input = st.text_area(
|
|
|
99 |
result = st.button("Find reason for contact")
|
100 |
|
101 |
if result:
|
|
|
|
|
|
|
|
|
102 |
generated_rfc = get_predictions(text=user_input, mode=mode)
|
103 |
+
st.text_area("Find reason for contact", generated_rfc)
|
104 |
print(f"Input: {user_input} ---> Reason for contact: {generated_rfc}")
|