JustKiddo commited on
Commit
edb75ca
·
verified ·
1 Parent(s): 4774881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -16
app.py CHANGED
@@ -64,25 +64,40 @@ def generate_tokens(text):
64
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
65
  """
66
 
67
- chatInterface = gr.ChatInterface(
68
- respond,
69
- additional_inputs=[
70
- gr.Textbox(value="You are a professional Mental Healthcare Chatbot.", label="System message"),
71
- gr.Slider(minimum=1, maximum=6144, value=6144, step=1, label="Max new tokens"),
72
- gr.Slider(minimum=0.1, maximum=4.0, value=1, step=0.1, label="Temperature"),
73
- gr.Slider(
74
- minimum=0.1,
75
- maximum=1.0,
76
- value=0.95,
77
- step=0.05,
78
- label="Top-p (nucleus sampling)",
79
- ),
80
- ],
81
- )
82
 
83
  with gr.Blocks() as demo:
84
  with gr.Row():
85
- chatInterface
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  with gr.Column():
87
  input_text = gr.Textbox(label="Input text")
88
  input_tokens = gr.Textbox(label="Input tokens")
 
64
  For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
65
  """
66
 
67
+ #chatInterface = gr.ChatInterface(
68
+ # respond,
69
+ # additional_inputs=[
70
+ # gr.Textbox(value="You are a professional Mental Healthcare Chatbot.", label="System message"),
71
+ # gr.Slider(minimum=1, maximum=6144, value=6144, step=1, label="Max new tokens"),
72
+ # gr.Slider(minimum=0.1, maximum=4.0, value=1, step=0.1, label="Temperature"),
73
+ # gr.Slider(
74
+ # minimum=0.1,
75
+ # maximum=1.0,
76
+ # value=0.95,
77
+ # step=0.05,
78
+ # label="Top-p (nucleus sampling)",
79
+ # ),
80
+ # ],
81
+ #)
82
 
83
  with gr.Blocks() as demo:
84
  with gr.Row():
85
+ gr.ChatInterface(
86
+ respond,
87
+ additional_inputs=[
88
+ gr.Textbox(value="You are a professional Mental Healthcare Chatbot.", label="System message"),
89
+ gr.Slider(minimum=1, maximum=6144, value=6144, step=1, label="Max new tokens"),
90
+ gr.Slider(minimum=0.1, maximum=4.0, value=1, step=0.1, label="Temperature"),
91
+ gr.Slider(
92
+ minimum=0.1,
93
+ maximum=1.0,
94
+ value=0.95,
95
+ step=0.05,
96
+ label="Top-p (nucleus sampling)",
97
+ ),
98
+ ],
99
+ )
100
+
101
  with gr.Column():
102
  input_text = gr.Textbox(label="Input text")
103
  input_tokens = gr.Textbox(label="Input tokens")