Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,12 +46,12 @@ with block:
|
|
| 46 |
api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here", placeholder="sk-...0VYO")
|
| 47 |
modelid = gr.Textbox(label="Model ID", placeholder="gpt-3.5-turbo")
|
| 48 |
systemm = gr.Textbox(label="System message", placeholder="You are a helpful assistant.")
|
| 49 |
-
submit_system = gr.Button("Send")
|
| 50 |
submit_system.click(chatgpt.system_message, inputs=[modelid, systemm])
|
| 51 |
chatbot = gr.Chatbot()
|
| 52 |
message = gr.Textbox(label="Message", placeholder="Hi, how are things ?")
|
| 53 |
state = gr.State()
|
| 54 |
-
submit = gr.Button("Send")
|
| 55 |
submit.click(chatgpt.answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])
|
| 56 |
clean = gr.Button("Clean")
|
| 57 |
clean.click(chatgpt.Clean, outputs=[chatbot, state])
|
|
|
|
| 46 |
api_key = gr.Textbox(type="password", label="Enter your OpenAI API key here", placeholder="sk-...0VYO")
|
| 47 |
modelid = gr.Textbox(label="Model ID", placeholder="gpt-3.5-turbo")
|
| 48 |
systemm = gr.Textbox(label="System message", placeholder="You are a helpful assistant.")
|
| 49 |
+
submit_system = gr.Button("Send model id and system message")
|
| 50 |
submit_system.click(chatgpt.system_message, inputs=[modelid, systemm])
|
| 51 |
chatbot = gr.Chatbot()
|
| 52 |
message = gr.Textbox(label="Message", placeholder="Hi, how are things ?")
|
| 53 |
state = gr.State()
|
| 54 |
+
submit = gr.Button("Send message")
|
| 55 |
submit.click(chatgpt.answer_chatgpt, inputs=[api_key, message, state], outputs=[chatbot, state])
|
| 56 |
clean = gr.Button("Clean")
|
| 57 |
clean.click(chatgpt.Clean, outputs=[chatbot, state])
|