Update app.py
Browse files
app.py
CHANGED
|
@@ -110,13 +110,13 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
|
|
| 110 |
# Remove backdrop
|
| 111 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 112 |
print(responses)
|
| 113 |
-
print(type(responses))
|
| 114 |
-
|
| 115 |
|
| 116 |
dall_e_prompt = promptImg + " , " + lens_option
|
| 117 |
-
primary =
|
| 118 |
-
headline =
|
| 119 |
-
description =
|
| 120 |
# Generate variations using DALL-E
|
| 121 |
removeBackdrop(image_path, "temp_no_bg.png")
|
| 122 |
NoBackImg = "temp_no_bg.png"
|
|
|
|
| 110 |
# Remove backdrop
|
| 111 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 112 |
print(responses)
|
| 113 |
+
#print(type(responses))
|
| 114 |
+
response = json.loads(responses)
|
| 115 |
|
| 116 |
dall_e_prompt = promptImg + " , " + lens_option
|
| 117 |
+
primary = response['primary']
|
| 118 |
+
headline = response['headline']
|
| 119 |
+
description = response['description']
|
| 120 |
# Generate variations using DALL-E
|
| 121 |
removeBackdrop(image_path, "temp_no_bg.png")
|
| 122 |
NoBackImg = "temp_no_bg.png"
|