Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
|
|
3 |
import openai
|
4 |
|
5 |
def gpt(api_key):
|
|
|
6 |
completion = openai.ChatCompletion.create(
|
7 |
model="gpt-3.5-turbo",
|
8 |
messages=[{"role": "user", "content": "Generate a fake news story"}]
|
|
|
3 |
import openai
|
4 |
|
5 |
def gpt(api_key):
|
6 |
+
openai.api_key = api_key
|
7 |
completion = openai.ChatCompletion.create(
|
8 |
model="gpt-3.5-turbo",
|
9 |
messages=[{"role": "user", "content": "Generate a fake news story"}]
|