Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,7 +159,7 @@ 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("'", '"')
|
| 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].replace('"', '\"').replace("'", '"')
|
| 163 |
print(f"Caption: {answer}")
|
| 164 |
parsed_answer = json.loads(answer)
|
| 165 |
caption_text = parsed_answer["<DETAILED_CAPTION>"].replace("The image shows ", "")
|