Commit
·
8d3b97d
1
Parent(s):
8ed4195
Update app.py
Browse files
app.py
CHANGED
@@ -72,11 +72,9 @@ def captioner(image):
|
|
72 |
captions = []
|
73 |
for endpoint, result in results.items():
|
74 |
if "error" not in result:
|
75 |
-
caption = (
|
76 |
-
f"## {endpoint}: \n {result[0]['generated_text']} \n\n\n"
|
77 |
-
)
|
78 |
else:
|
79 |
-
caption = f"
|
80 |
captions.append(caption)
|
81 |
return "".join(captions) # Join all captions into a single string
|
82 |
|
|
|
72 |
captions = []
|
73 |
for endpoint, result in results.items():
|
74 |
if "error" not in result:
|
75 |
+
caption = (f"### [{endpoint}]({endpoint_base_url+endpoint}): \n {result[0]['generated_text']} \n {"-" * 50} \n ")
|
|
|
|
|
76 |
else:
|
77 |
+
caption = f"### [{endpoint}]({endpoint_base_url+endpoint}): \n Error - {result['error']} \n {"-" * 50} \n "
|
78 |
captions.append(caption)
|
79 |
return "".join(captions) # Join all captions into a single string
|
80 |
|