sbthesis commited on
Commit
412347c
·
1 Parent(s): ea8cf54

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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, history=[]):
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=["chatbot", "state"],
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