Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ openai_api_key = os.getenv("OPENAI_API_KEY")
|
|
9 |
import io
|
10 |
import base64
|
11 |
import requests
|
|
|
12 |
|
13 |
def generate_story(image, theme, genre, word_count):
|
14 |
try:
|
@@ -45,7 +46,7 @@ def generate_story(image, theme, genre, word_count):
|
|
45 |
"content": [
|
46 |
{
|
47 |
"type": "text",
|
48 |
-
"text": '''Describe or caption the image within 20 words.
|
49 |
},
|
50 |
{
|
51 |
"type": "image_url",
|
|
|
9 |
import io
|
10 |
import base64
|
11 |
import requests
|
12 |
+
from PIL import Image
|
13 |
|
14 |
def generate_story(image, theme, genre, word_count):
|
15 |
try:
|
|
|
46 |
"content": [
|
47 |
{
|
48 |
"type": "text",
|
49 |
+
"text": '''Describe or caption the image within 20 words.'''
|
50 |
},
|
51 |
{
|
52 |
"type": "image_url",
|