Spaces:
Sleeping
Sleeping
Commit
•
f1d76bf
1
Parent(s):
27461f9
Update app.py
Browse files
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]
|
|
|
|
|
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 ", "")
|