Spaces:
Runtime error
Runtime error
Commit
·
ce86582
1
Parent(s):
9867ef4
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import openai
|
2 |
-
import gradio
|
3 |
|
4 |
-
openai.api_key = "
|
5 |
|
6 |
-
messages = [{"role": "system", "content": "
|
7 |
|
8 |
def CustomChatGPT(user_input):
|
9 |
messages.append({"role": "user", "content": user_input})
|
@@ -15,6 +15,5 @@ def CustomChatGPT(user_input):
|
|
15 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
16 |
return ChatGPT_reply
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
demo.launch(share=True)
|
|
|
1 |
import openai
|
2 |
+
import gradio as gr
|
3 |
|
4 |
+
openai.api_key = "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"
|
5 |
|
6 |
+
messages = [{"role": "system", "content": "you are a brother to all"}]
|
7 |
|
8 |
def CustomChatGPT(user_input):
|
9 |
messages.append({"role": "user", "content": user_input})
|
|
|
15 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
16 |
return ChatGPT_reply
|
17 |
|
18 |
+
iface = gr.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "bhAI")
|
19 |
+
iface.launch()
|
|