Mayur2 commited on
Commit
c685ebf
·
1 Parent(s): 7dc3755

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
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 =""