Spaces:
Configuration error
Configuration error
Commit ·
8d6f83e
1
Parent(s): 887f7e2
fixed typo
Browse files
app.py
CHANGED
|
@@ -168,7 +168,7 @@ import requests
|
|
| 168 |
import base64
|
| 169 |
|
| 170 |
def get_image(prompt="Random monster"):
|
| 171 |
-
openai.api_key = os.
|
| 172 |
response = openai.Image.create(
|
| 173 |
prompt = prompt + ", realistic fantasy style",
|
| 174 |
n=1,
|
|
@@ -190,7 +190,7 @@ def make_image_and_story(prompt):
|
|
| 190 |
|
| 191 |
caption = get_caption("sample.png")
|
| 192 |
|
| 193 |
-
co = cohere.Client(os.
|
| 194 |
response = co.generate(prompt=caption, model ='aeb523c3-a79c-48ba-9274-a12ac07492a2-ft', max_tokens=80)
|
| 195 |
|
| 196 |
return Image.open("sample.png"), processing(response.generations[0].text)
|
|
|
|
| 168 |
import base64
|
| 169 |
|
| 170 |
def get_image(prompt="Random monster"):
|
| 171 |
+
openai.api_key = os.getenv("OPENAI_KEY")
|
| 172 |
response = openai.Image.create(
|
| 173 |
prompt = prompt + ", realistic fantasy style",
|
| 174 |
n=1,
|
|
|
|
| 190 |
|
| 191 |
caption = get_caption("sample.png")
|
| 192 |
|
| 193 |
+
co = cohere.Client(os.getenv("COHERE_KEY"))
|
| 194 |
response = co.generate(prompt=caption, model ='aeb523c3-a79c-48ba-9274-a12ac07492a2-ft', max_tokens=80)
|
| 195 |
|
| 196 |
return Image.open("sample.png"), processing(response.generations[0].text)
|