Update app.py
Browse files
app.py
CHANGED
@@ -6,10 +6,10 @@ title = "Saras second try at ChatBot"
|
|
6 |
description = "Based on a zero-shot-classification model (default facebook/bart-large-mnli)"
|
7 |
examples = [["The president was elected last week then convicted of ten crimes and imprisoned, though he was paid $10,000 for his trouble"]]
|
8 |
|
|
|
9 |
|
10 |
#heres the prediction function tp predict the response and add it to history
|
11 |
-
def predict(input
|
12 |
-
classifier = pipeline("zero-shot-classification")
|
13 |
# generate a response
|
14 |
response = classifier(
|
15 |
input,
|
@@ -24,7 +24,7 @@ gr.Interface(
|
|
24 |
description=description,
|
25 |
examples=examples,
|
26 |
inputs=["text", "state"],
|
27 |
-
outputs=["
|
28 |
theme="finlaymacklon/boxy_violet",
|
29 |
).launch()
|
30 |
|
|
|
6 |
description = "Based on a zero-shot-classification model (default facebook/bart-large-mnli)"
|
7 |
examples = [["The president was elected last week then convicted of ten crimes and imprisoned, though he was paid $10,000 for his trouble"]]
|
8 |
|
9 |
+
classifier = pipeline("zero-shot-classification")
|
10 |
|
11 |
#heres the prediction function tp predict the response and add it to history
|
12 |
+
def predict(input):
|
|
|
13 |
# generate a response
|
14 |
response = classifier(
|
15 |
input,
|
|
|
24 |
description=description,
|
25 |
examples=examples,
|
26 |
inputs=["text", "state"],
|
27 |
+
outputs=["text", "state"],
|
28 |
theme="finlaymacklon/boxy_violet",
|
29 |
).launch()
|
30 |
|