Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,7 @@ def get_predictions(text, mode):
|
|
48 |
max_length=100,
|
49 |
)
|
50 |
elif mode == "Polish - RfC Detection":
|
51 |
-
output =
|
52 |
input_ids,
|
53 |
no_repeat_ngram_size=2,
|
54 |
num_beams=3,
|
@@ -91,15 +91,15 @@ if __name__ == "__main__":
|
|
91 |
|
92 |
result = st.button("Find reason for contact")
|
93 |
if mode == "Polish - RfC Generation (accepts whole conversation)":
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
text_area = "Put a whole conversation or full e-mail here."
|
98 |
|
99 |
elif mode == "Polish - RfC Detection (accepts one turn)":
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
text_area = "Put a single turn or a few sentences here."
|
104 |
|
105 |
if result:
|
|
|
48 |
max_length=100,
|
49 |
)
|
50 |
elif mode == "Polish - RfC Detection":
|
51 |
+
output = model_det_pl.generate(
|
52 |
input_ids,
|
53 |
no_repeat_ngram_size=2,
|
54 |
num_beams=3,
|
|
|
91 |
|
92 |
result = st.button("Find reason for contact")
|
93 |
if mode == "Polish - RfC Generation (accepts whole conversation)":
|
94 |
+
st.markdown("### You selected RfC Generation model.")
|
95 |
+
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.**")
|
96 |
+
st.markdown("-- *Output*: Reason for calling for the whole conversation.")
|
97 |
text_area = "Put a whole conversation or full e-mail here."
|
98 |
|
99 |
elif mode == "Polish - RfC Detection (accepts one turn)":
|
100 |
+
st.markdown("### You selected RfC Detection model.")
|
101 |
+
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.'**")
|
102 |
+
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.")
|
103 |
text_area = "Put a single turn or a few sentences here."
|
104 |
|
105 |
if result:
|