apratim24 commited on
Commit
4d28c0e
·
verified ·
1 Parent(s): 1b094c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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. Output in json format with key: Description'''
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",