Mayur2 commited on
Commit
8b04e6b
·
1 Parent(s): f27efd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -149,12 +149,13 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
149
  for key, value in key_value_dict.items():
150
  print(key + ": " + value)
151
  items = list(key_value_dict.items())
152
- description = items[0][0]
153
- print(description)
154
- primary = items[1][0]
155
- print(primary)
156
- headline = items[2][0]
157
- print(headline)
 
158
 
159
  # json_string = responses.strip()
160
 
 
149
  for key, value in key_value_dict.items():
150
  print(key + ": " + value)
151
  items = list(key_value_dict.items())
152
+ if(items[0][0]=='primary')
153
+ primary=items[0][1]
154
+ elif(items[0][0]=='headline')
155
+ headline=items[0][1])
156
+ elif(items[0][0]=='description')
157
+ description=items[0][1])
158
+
159
 
160
  # json_string = responses.strip()
161