Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -35,9 +35,9 @@ with block:
|
|
| 35 |
gr.Markdown("""<h1><center>π€ ChatGPT-Assistant π</center></h1>
|
| 36 |
<p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
|
| 37 |
""")
|
| 38 |
-
api_key = gr.Textbox(
|
| 39 |
chatbot = gr.Chatbot()
|
| 40 |
-
message = gr.Textbox(
|
| 41 |
state = gr.State()
|
| 42 |
submit = gr.Button("Send")
|
| 43 |
submit.click(answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])
|
|
|
|
| 35 |
gr.Markdown("""<h1><center>π€ ChatGPT-Assistant π</center></h1>
|
| 36 |
<p><center>ChatGPT-Assistant is a chatbot that uses the gpt-3.5-turbo model</center></p>
|
| 37 |
""")
|
| 38 |
+
api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here")
|
| 39 |
chatbot = gr.Chatbot()
|
| 40 |
+
message = gr.Textbox(label="Message")
|
| 41 |
state = gr.State()
|
| 42 |
submit = gr.Button("Send")
|
| 43 |
submit.click(answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])
|