codeblacks commited on
Commit
4177b78
·
verified ·
1 Parent(s): 6fce3b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -40,15 +40,13 @@ async def respond(
40
 
41
  response += token
42
  yield response
43
-
44
 
45
- def sync_respond(*args):
46
- return asyncio.run(respond(*args))
47
  """
48
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
49
  """
50
  demo = gr.ChatInterface(
51
- sync_respond,
52
  additional_inputs=[
53
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
54
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
 
40
 
41
  response += token
42
  yield response
 
43
 
44
+
 
45
  """
46
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
47
  """
48
  demo = gr.ChatInterface(
49
+ respond,
50
  additional_inputs=[
51
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
52
  gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),