Update app.py
Browse files
app.py
CHANGED
|
@@ -143,6 +143,9 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
|
|
| 143 |
# Print each key-value pair on a new line
|
| 144 |
for key, value in key_value_dict.items():
|
| 145 |
print(key + ": " + value)
|
|
|
|
|
|
|
|
|
|
| 146 |
# json_string = responses.strip()
|
| 147 |
|
| 148 |
# # Add indentation and new lines after each key-value pair
|
|
@@ -170,10 +173,7 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
|
|
| 170 |
# # Get and return the images
|
| 171 |
# result_images = outputGenImages(image_path, response_data)
|
| 172 |
|
| 173 |
-
text_output =
|
| 174 |
-
for key, value in my_dict.items():
|
| 175 |
-
html += f'<li>{key}: {value}</li>'
|
| 176 |
-
html += '</ul>"
|
| 177 |
|
| 178 |
return text_output#, result_images # Output should be a list of PIL Image objects or numpy arrays
|
| 179 |
|
|
|
|
| 143 |
# Print each key-value pair on a new line
|
| 144 |
for key, value in key_value_dict.items():
|
| 145 |
print(key + ": " + value)
|
| 146 |
+
items = list(key_value_dict.items())
|
| 147 |
+
first_pair = items[0]
|
| 148 |
+
print(first_pair)
|
| 149 |
# json_string = responses.strip()
|
| 150 |
|
| 151 |
# # Add indentation and new lines after each key-value pair
|
|
|
|
| 173 |
# # Get and return the images
|
| 174 |
# result_images = outputGenImages(image_path, response_data)
|
| 175 |
|
| 176 |
+
text_output = <h2>{headline}</h2><h3>{primary}</h3><p>{description}
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
return text_output#, result_images # Output should be a list of PIL Image objects or numpy arrays
|
| 179 |
|