Update app.py
Browse files
app.py
CHANGED
|
@@ -49,6 +49,7 @@ chatgpt_chain = LLMChain(
|
|
| 49 |
llm=OpenAI(temperature=1),
|
| 50 |
prompt=prompt,
|
| 51 |
verbose=True,
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
#Helper function as this is what Pebblely API takes in
|
|
@@ -113,7 +114,7 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
|
|
| 113 |
image.save(image_path)
|
| 114 |
# Remove backdrop
|
| 115 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 116 |
-
print(responses)
|
| 117 |
json_string = responses.strip()
|
| 118 |
|
| 119 |
# Add indentation and new lines after each key-value pair
|
|
|
|
| 49 |
llm=OpenAI(temperature=1),
|
| 50 |
prompt=prompt,
|
| 51 |
verbose=True,
|
| 52 |
+
return_intermediate_steps=True
|
| 53 |
)
|
| 54 |
|
| 55 |
#Helper function as this is what Pebblely API takes in
|
|
|
|
| 114 |
image.save(image_path)
|
| 115 |
# Remove backdrop
|
| 116 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 117 |
+
print(responses["intermediate_steps"])
|
| 118 |
json_string = responses.strip()
|
| 119 |
|
| 120 |
# Add indentation and new lines after each key-value pair
|