Spaces:
Runtime error
Runtime error
joaomorossini
commited on
Commit
·
4be6783
1
Parent(s):
4782bb5
Update app.py
Browse filesFormat outpout
app.py
CHANGED
@@ -73,9 +73,9 @@ def captioner(image):
|
|
73 |
captions = []
|
74 |
for endpoint, result in results.items():
|
75 |
if "error" not in result:
|
76 |
-
caption = (f"
|
77 |
else:
|
78 |
-
caption = f"
|
79 |
captions.append(caption)
|
80 |
return "".join(captions) # Join all captions into a single string
|
81 |
|
|
|
73 |
captions = []
|
74 |
for endpoint, result in results.items():
|
75 |
if "error" not in result:
|
76 |
+
caption = (f"**[{endpoint}]({hf_base_url+endpoint})**: \n {result[0]['generated_text']} \n {'-' * 50} \n ")
|
77 |
else:
|
78 |
+
caption = f"**[{endpoint}]({hf_base_url+endpoint})**: \n Error - {result['error']} \n {'-' * 50} \n "
|
79 |
captions.append(caption)
|
80 |
return "".join(captions) # Join all captions into a single string
|
81 |
|