multimodalart HF staff commited on
Commit
f1d76bf
1 Parent(s): 27461f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -159,7 +159,9 @@ def run_captioning_spaces(images, concept_sentence, *captions):
159
  task_prompt="Detailed Caption",
160
  text_input=None,
161
  api_name="/process_image"
162
- )[0].replace('"', '\\"').replace("'", '"')
 
 
163
  print(f"Caption: {answer}")
164
  parsed_answer = json.loads(answer)
165
  caption_text = parsed_answer["<DETAILED_CAPTION>"].replace("The image shows ", "")
 
159
  task_prompt="Detailed Caption",
160
  text_input=None,
161
  api_name="/process_image"
162
+ )[0]
163
+ print(answer)
164
+ answer = answer.replace('"', '\\"').replace("'", '"')
165
  print(f"Caption: {answer}")
166
  parsed_answer = json.loads(answer)
167
  caption_text = parsed_answer["<DETAILED_CAPTION>"].replace("The image shows ", "")