Jack7510 commited on
Commit
c393516
·
1 Parent(s): 5e6e9bb

Update app.py

Browse files

change openai model,
add share=True

Files changed (1) hide show
  1. app.py +2 -2
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
- engine="davinci",
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)