Migu3low commited on
Commit
6fe3533
·
verified ·
1 Parent(s): 592fa2b

Add Second Chatbot

Browse files
Files changed (1) hide show
  1. app.py +18 -3
app.py CHANGED
@@ -42,7 +42,7 @@ def respond(
42
  """
43
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
44
  """
45
- demo = gr.ChatInterface(
46
  respond,
47
  additional_inputs=[
48
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
@@ -58,6 +58,21 @@ demo = gr.ChatInterface(
58
  ],
59
  )
60
 
61
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  if __name__ == "__main__":
63
- demo.launch()
 
 
42
  """
43
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
44
  """
45
+ demo1 = gr.ChatInterface(
46
  respond,
47
  additional_inputs=[
48
  gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
 
58
  ],
59
  )
60
 
61
+ demo2 = gr.ChatInterface(
62
+ respond,
63
+ additional_inputs=[
64
+ gr.Textbox(value="You are a friendly Chatbot.", label="System message"),
65
+ gr.Slider(minimum=1, maximum=2048, value=512, step=1, label="Max new tokens"),
66
+ gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
67
+ gr.Slider(
68
+ minimum=0.1,
69
+ maximum=1.0,
70
+ value=0.95,
71
+ step=0.05,
72
+ label="Top-p (nucleus sampling)",
73
+ ),
74
+ ],
75
+ )
76
  if __name__ == "__main__":
77
+ demo1.launch()
78
+ demo2.launch()