Update app.py
Browse files
app.py
CHANGED
|
@@ -116,6 +116,11 @@ def upload_and_process(image, promptText, promptImg, lens_option, n_images, size
|
|
| 116 |
# Remove backdrop
|
| 117 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 118 |
print(responses)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
split_pairs = responses.split(" ")
|
| 120 |
pk =""
|
| 121 |
hk =""
|
|
|
|
| 116 |
# Remove backdrop
|
| 117 |
responses = chatgpt_chain.predict(human_input=promptText)
|
| 118 |
print(responses)
|
| 119 |
+
index = responses.find("Output:")
|
| 120 |
+
|
| 121 |
+
# Remove "Output:" from the string if found
|
| 122 |
+
if index != -1:
|
| 123 |
+
responses = output_string[:index] + output_string[index + len("Output:"):]
|
| 124 |
split_pairs = responses.split(" ")
|
| 125 |
pk =""
|
| 126 |
hk =""
|