Spaces:
Running
Running
Update app.py
Browse fileschange openai model,
add share=True
app.py
CHANGED
@@ -10,7 +10,7 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
|
|
10 |
def chatbot(text):
|
11 |
# Call the OpenAI API to generate a response
|
12 |
response = openai.Completion.create(
|
13 |
-
|
14 |
prompt=text,
|
15 |
max_tokens=1024,
|
16 |
n=1,
|
@@ -25,4 +25,4 @@ def chatbot(text):
|
|
25 |
iface = gr.Interface(fn=chatbot, inputs="text", outputs="text", title="GPT-3 Chatbot")
|
26 |
|
27 |
# Launch the interface
|
28 |
-
iface.launch()
|
|
|
10 |
def chatbot(text):
|
11 |
# Call the OpenAI API to generate a response
|
12 |
response = openai.Completion.create(
|
13 |
+
model="text-davinci-003",
|
14 |
prompt=text,
|
15 |
max_tokens=1024,
|
16 |
n=1,
|
|
|
25 |
iface = gr.Interface(fn=chatbot, inputs="text", outputs="text", title="GPT-3 Chatbot")
|
26 |
|
27 |
# Launch the interface
|
28 |
+
iface.launch(share=True)
|