Mayur2 commited on
Commit
025e4c6
·
1 Parent(s): f2cbbb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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
- #responses = json.loads(responses)
115
 
116
  dall_e_prompt = promptImg + " , " + lens_option
117
- primary = "P"
118
- headline = "R"
119
- description = "D"
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"