Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ import gradio as gr
|
|
6 |
#openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
|
8 |
#if you have OpenAI API key as a string, enable the below
|
9 |
-
openai.api_key = "sk-
|
10 |
|
11 |
start_sequence = "\nAI:"
|
12 |
restart_sequence = "\nHuman: "
|
13 |
|
14 |
#prompt = "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
|
15 |
-
prompt = "You are TransGPT, a specialist in the field of transportation.The specialist
|
16 |
def openai_create(prompt):
|
17 |
|
18 |
response = openai.Completion.create(
|
|
|
6 |
#openai.api_key = os.getenv("OPENAI_API_KEY")
|
7 |
|
8 |
#if you have OpenAI API key as a string, enable the below
|
9 |
+
openai.api_key = "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"
|
10 |
|
11 |
start_sequence = "\nAI:"
|
12 |
restart_sequence = "\nHuman: "
|
13 |
|
14 |
#prompt = "The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
|
15 |
+
prompt = "You are TransGPT, a specialist in the field of transportation.The specialist supports the understanding and reply of Chinese.\n\nHuman: Hello, who are you?\nAI: I am an AI created by OpenAI. How can I help you today?\nHuman: "
|
16 |
def openai_create(prompt):
|
17 |
|
18 |
response = openai.Completion.create(
|