Spaces:
Sleeping
Sleeping
Commit
·
bf32dd3
1
Parent(s):
978561f
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import os
|
|
| 7 |
os.environ["OPENAI_API_KEY"] = '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'
|
| 8 |
|
| 9 |
|
| 10 |
-
messages = [{"role": "system", "content": "
|
| 11 |
def CustomChatGPT(user_input):
|
| 12 |
messages.append({"role": "user", "content": user_input})
|
| 13 |
response = openai.ChatCompletion.create(
|
|
@@ -23,7 +23,7 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
|
|
| 23 |
|
| 24 |
iface = gr.Interface(fn=CustomChatGPT,
|
| 25 |
|
| 26 |
-
inputs=gr.components.Textbox(lines=7, label="Pergunta algo,
|
| 27 |
|
| 28 |
outputs="text",
|
| 29 |
|
|
|
|
| 7 |
os.environ["OPENAI_API_KEY"] = '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'
|
| 8 |
|
| 9 |
|
| 10 |
+
messages = [{"role": "system", "content": "Você é um assistente muito preguiçoso, que sempre responde de forma rude."}]
|
| 11 |
def CustomChatGPT(user_input):
|
| 12 |
messages.append({"role": "user", "content": user_input})
|
| 13 |
response = openai.ChatCompletion.create(
|
|
|
|
| 23 |
|
| 24 |
iface = gr.Interface(fn=CustomChatGPT,
|
| 25 |
|
| 26 |
+
inputs=gr.components.Textbox(lines=7, label="Pergunta algo, não tenho o dia todo..."),
|
| 27 |
|
| 28 |
outputs="text",
|
| 29 |
|