Spaces:
Runtime error
Runtime error
Commit
·
5c7be5d
1
Parent(s):
8422486
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,6 @@ messages = SysIns
|
|
25 |
|
26 |
def openai_chatcreate(prompt):
|
27 |
messages.append({"role":"user","content":prompt})
|
28 |
-
print(messages)
|
29 |
response = openai.ChatCompletion.create(
|
30 |
model='gpt-3.5-turbo',
|
31 |
messages=messages
|
@@ -39,7 +38,6 @@ def chatgpt_chatclone(input, history):
|
|
39 |
s.append(input)
|
40 |
output = openai_chatcreate(input)
|
41 |
history.append((input, output))
|
42 |
-
# print(history)
|
43 |
return history, history
|
44 |
|
45 |
def chatgpt_clear(input, history):
|
@@ -58,4 +56,4 @@ with blocks:
|
|
58 |
clear = gr.Button("Clear")
|
59 |
clear.click(fn=chatgpt_clear, inputs=[message, state], outputs=[message, chatbot, state])
|
60 |
|
61 |
-
blocks.launch(debug=False)
|
|
|
25 |
|
26 |
def openai_chatcreate(prompt):
|
27 |
messages.append({"role":"user","content":prompt})
|
|
|
28 |
response = openai.ChatCompletion.create(
|
29 |
model='gpt-3.5-turbo',
|
30 |
messages=messages
|
|
|
38 |
s.append(input)
|
39 |
output = openai_chatcreate(input)
|
40 |
history.append((input, output))
|
|
|
41 |
return history, history
|
42 |
|
43 |
def chatgpt_clear(input, history):
|
|
|
56 |
clear = gr.Button("Clear")
|
57 |
clear.click(fn=chatgpt_clear, inputs=[message, state], outputs=[message, chatbot, state])
|
58 |
|
59 |
+
blocks.launch(debug=False, server_port=8080)
|