dylanmeca commited on
Commit
a87eb00
Β·
1 Parent(s): e838aa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -40,12 +40,12 @@ with block:
40
  gr.Markdown("""<h1><center>πŸ€– ChatGPT-Assistant 🐍</center></h1>
41
  <p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
42
  """)
43
- api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here")
44
- system = gr.Textbox(label="System message", placeholder="Example: You are a helpful assistant.")
45
  sub = gr.Button("Send")
46
  sub.click(chatgpt.system_message, inputs=[system])
47
  chatbot = gr.Chatbot()
48
- message = gr.Textbox(label="Message")
49
  state = gr.State()
50
  submit = gr.Button("Send")
51
  submit.click(chatgpt.answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])
 
40
  gr.Markdown("""<h1><center>πŸ€– ChatGPT-Assistant 🐍</center></h1>
41
  <p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
42
  """)
43
+ api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here", placeholder="sk-...0VYO")
44
+ system = gr.Textbox(label="System message", placeholder="You are a helpful assistant.")
45
  sub = gr.Button("Send")
46
  sub.click(chatgpt.system_message, inputs=[system])
47
  chatbot = gr.Chatbot()
48
+ message = gr.Textbox(label="Message", placeholder="Hi, how are things ?")
49
  state = gr.State()
50
  submit = gr.Button("Send")
51
  submit.click(chatgpt.answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])