Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,10 +12,10 @@ model_pipeline = pipeline(task="text-classification", model=model_name, device=d
|
|
12 |
# templates
|
13 |
conv_template = Template(
|
14 |
"""
|
15 |
-
#
|
16 |
{{ document }}
|
17 |
-
|
18 |
-
#
|
19 |
{% for message in conversation %}
|
20 |
{{ message.role }}: {{ message.content }}
|
21 |
{% endfor %}
|
@@ -24,24 +24,22 @@ conv_template = Template(
|
|
24 |
|
25 |
qa_template = Template(
|
26 |
"""
|
27 |
-
#
|
28 |
{{ document }}
|
29 |
-
|
30 |
-
#
|
31 |
-
{{ question }}
|
32 |
-
|
33 |
-
# Answer:
|
34 |
-
{{ answer }}
|
35 |
"""
|
36 |
)
|
37 |
|
38 |
nli_template = Template(
|
39 |
"""
|
40 |
-
#
|
41 |
{{ document }}
|
42 |
-
|
43 |
# Claim:
|
44 |
-
{{ claim }}
|
45 |
"""
|
46 |
)
|
47 |
|
|
|
12 |
# templates
|
13 |
conv_template = Template(
|
14 |
"""
|
15 |
+
# Context:
|
16 |
{{ document }}
|
17 |
+
|
18 |
+
# Claim:
|
19 |
{% for message in conversation %}
|
20 |
{{ message.role }}: {{ message.content }}
|
21 |
{% endfor %}
|
|
|
24 |
|
25 |
qa_template = Template(
|
26 |
"""
|
27 |
+
# Context:
|
28 |
{{ document }}
|
29 |
+
|
30 |
+
# Claim:
|
31 |
+
user: {{ question }}
|
32 |
+
assistant: {{ answer }}
|
|
|
|
|
33 |
"""
|
34 |
)
|
35 |
|
36 |
nli_template = Template(
|
37 |
"""
|
38 |
+
# Context:
|
39 |
{{ document }}
|
40 |
+
|
41 |
# Claim:
|
42 |
+
assistant: {{ claim }}
|
43 |
"""
|
44 |
)
|
45 |
|