mikeee commited on
Commit
54d9629
1 Parent(s): c724bd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -244,9 +244,10 @@ with gr.Blocks(
244
 
245
  # with gr.Row():
246
  with gr.Accordion("Disclaimer", open=False):
 
247
  gr.Markdown(
248
- f"Disclaimer: {'-'.join(model_filename.split('-')[:2])} can produce factually incorrect output, and should not be relied on to produce "
249
- "factually accurate information. MPT-30B was trained on various public datasets; while great efforts "
250
  "have been taken to clean the pretraining data, it is possible that this model could generate lewd, "
251
  "biased, or otherwise offensive outputs.",
252
  elem_classes=["disclaimer"],
@@ -254,7 +255,7 @@ with gr.Blocks(
254
 
255
  msg.submit(
256
  # fn=conversation.user_turn,
257
- fn=predict0,
258
  inputs=[msg, chatbot],
259
  outputs=[msg, chatbot],
260
  queue=True,
@@ -262,8 +263,7 @@ with gr.Blocks(
262
  api_name="predict",
263
  )
264
  submit.click(
265
- # fn=predict0,
266
- fn=lambda x, y: ("",) + predict0(x, y)[1:], # clear msg
267
  inputs=[msg, chatbot],
268
  outputs=[msg, chatbot],
269
  queue=True,
 
244
 
245
  # with gr.Row():
246
  with gr.Accordion("Disclaimer", open=False):
247
+ _ {'-'.join(model_filename.split('-')[:2])}
248
  gr.Markdown(
249
+ f"Disclaimer: {_} can produce factually incorrect output, and should not be relied on to produce "
250
+ "factually accurate information. {_} was trained on various public datasets; while great efforts "
251
  "have been taken to clean the pretraining data, it is possible that this model could generate lewd, "
252
  "biased, or otherwise offensive outputs.",
253
  elem_classes=["disclaimer"],
 
255
 
256
  msg.submit(
257
  # fn=conversation.user_turn,
258
+ fn=predict,
259
  inputs=[msg, chatbot],
260
  outputs=[msg, chatbot],
261
  queue=True,
 
263
  api_name="predict",
264
  )
265
  submit.click(
266
+ fn=lambda x, y: ("",) + predict(x, y)[1:], # clear msg
 
267
  inputs=[msg, chatbot],
268
  outputs=[msg, chatbot],
269
  queue=True,