Kyan14 commited on
Commit
a49cb77
·
1 Parent(s): 431dc6f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -55,6 +55,9 @@ def generate_art(mood):
55
 
56
  response = requests.post('https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5', headers=headers, json=json_data).json()
57
 
 
 
 
58
  # Extract the generated image URL from the response
59
  image_url = response["generated_images"][0]["url"]
60
 
@@ -64,6 +67,7 @@ def generate_art(mood):
64
 
65
  return image
66
 
 
67
  def mood_art_generator(image):
68
  mood = get_mood_from_image(image)
69
  if mood:
 
55
 
56
  response = requests.post('https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5', headers=headers, json=json_data).json()
57
 
58
+ # Print the response for debugging
59
+ print("Response:", response)
60
+
61
  # Extract the generated image URL from the response
62
  image_url = response["generated_images"][0]["url"]
63
 
 
67
 
68
  return image
69
 
70
+
71
  def mood_art_generator(image):
72
  mood = get_mood_from_image(image)
73
  if mood: