Chris4K commited on
Commit
629a917
1 Parent(s): b8d0c43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -171,15 +171,16 @@ model_name = 'facebook/blenderbot-400M-distill'
171
  tokenizer = BlenderbotTokenizer.from_pretrained(model_name)
172
  model = BlenderbotForConditionalGeneration.from_pretrained(model_name)
173
 
174
- def func (message,text, numb):
175
  inputs = tokenizer(message, return_tensors="pt")
176
  result = model.generate(**inputs)
177
- return tokenizer.decode(result[0]),9
178
 
179
 
180
 
181
  app = gr.Interface(
182
  fn=func,
 
183
  inputs=["text", "checkbox", gr.Slider(0, 100)],
184
  outputs=["text", "number"],
185
  )
 
171
  tokenizer = BlenderbotTokenizer.from_pretrained(model_name)
172
  model = BlenderbotForConditionalGeneration.from_pretrained(model_name)
173
 
174
+ def func (message, checkbox, numb):
175
  inputs = tokenizer(message, return_tensors="pt")
176
  result = model.generate(**inputs)
177
+ return tokenizer.decode(result[0]),"0.9"
178
 
179
 
180
 
181
  app = gr.Interface(
182
  fn=func,
183
+ title="Conversation Bota"
184
  inputs=["text", "checkbox", gr.Slider(0, 100)],
185
  outputs=["text", "number"],
186
  )