Dagfinn1962 commited on
Commit
290d555
1 Parent(s): ac469ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -26
app.py CHANGED
@@ -120,20 +120,20 @@ with gr.Blocks(
120
  )
121
 
122
  )as demo:
123
- gr.Markdown(
124
- """<H1><center>Chat with gpt-3.5-turbo</center></h1>
125
- <h3> This is a lightweight demo of gpt-3.5-turbo conversation completion.
126
-
127
  """
128
  )
129
  conversation = Chat()
130
- with gr.Column():
 
131
  # to do: change to openaikey input for public release
132
  openai_key = gr.Textbox(
133
  label="OpenAI Key",
134
  value="",
135
  type="password",
136
- placeholder="",
137
  info="You have to provide your own OpenAI API key.",
138
  )
139
  chatbot = gr.Chatbot().style(height=400)
@@ -149,19 +149,19 @@ with gr.Blocks(
149
  submit = gr.Button("Submit")
150
  stop = gr.Button("Stop")
151
  clear = gr.Button("Clear")
152
- # with gr.Row():
153
- # with gr.Accordion("Advanced Options:", open=False):
154
- # with gr.Row():
155
- # with gr.Column(scale=2):
156
- # system = gr.Textbox(
157
- # label="System Prompt",
158
- # value=Chat.default_system_prompt,
159
- # show_label=False,
160
- # ).style(container=False)
161
- # with gr.Column():
162
- # with gr.Row():
163
- # change = gr.Button("Change System Prompt")
164
- # reset = gr.Button("Reset System Prompt")
165
  with gr.Row():
166
  gr.Markdown(
167
  "Disclaimer: The gpt-3.5-turbo model can produce factually incorrect output, and should not be solely relied on to produce "
@@ -176,12 +176,6 @@ with gr.Blocks(
176
  elem_classes=["disclaimer"],
177
  )
178
 
179
- with gr.Row():
180
- gr.Markdown(
181
- "[Privacy policy](https://gist.github.com/samhavens/c29c68cdcd420a9aa0202d0839876dac)",
182
- elem_classes=["disclaimer"],
183
- )
184
-
185
  submit_event = msg.submit(
186
  fn=conversation.user_turn,
187
  inputs=[msg, chatbot],
@@ -231,4 +225,4 @@ with gr.Blocks(
231
  )
232
 
233
 
234
- demo.queue(max_size=36, concurrency_count=14).launch(debug=True)
 
120
  )
121
 
122
  )as demo:
123
+ gr.Markdown(
124
+ """<h1><center>Chat with gpt-3.5-turbo</center></h1>
125
+ This is a lightweight demo of gpt-3.5-turbo conversation completion. It was designed as a template for in-context learning applications to be built on top of.
 
126
  """
127
  )
128
  conversation = Chat()
129
+ with gr.Row():
130
+ with gr.Column():
131
  # to do: change to openaikey input for public release
132
  openai_key = gr.Textbox(
133
  label="OpenAI Key",
134
  value="",
135
  type="password",
136
+ placeholder="sk..",
137
  info="You have to provide your own OpenAI API key.",
138
  )
139
  chatbot = gr.Chatbot().style(height=400)
 
149
  submit = gr.Button("Submit")
150
  stop = gr.Button("Stop")
151
  clear = gr.Button("Clear")
152
+ with gr.Row():
153
+ with gr.Accordion("Advanced Options:", open=False):
154
+ with gr.Row():
155
+ with gr.Column(scale=2):
156
+ system = gr.Textbox(
157
+ label="System Prompt",
158
+ value=Chat.default_system_prompt,
159
+ show_label=False,
160
+ ).style(container=False)
161
+ with gr.Column():
162
+ with gr.Row():
163
+ change = gr.Button("Change System Prompt")
164
+ reset = gr.Button("Reset System Prompt")
165
  with gr.Row():
166
  gr.Markdown(
167
  "Disclaimer: The gpt-3.5-turbo model can produce factually incorrect output, and should not be solely relied on to produce "
 
176
  elem_classes=["disclaimer"],
177
  )
178
 
 
 
 
 
 
 
179
  submit_event = msg.submit(
180
  fn=conversation.user_turn,
181
  inputs=[msg, chatbot],
 
225
  )
226
 
227
 
228
+ demo.queue(max_size=36, concurrency_count=14).launch(debug=True)