Spaces:
Runtime error
Runtime error
Make caption font a bit larger again.
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ def gen_show_caption(sub_prompt=None, cap_prompt=""):
|
|
24 |
}}
|
25 |
</style>
|
26 |
|
27 |
-
|
28 |
""",
|
29 |
unsafe_allow_html=True,
|
30 |
)
|
@@ -105,19 +105,21 @@ st.session_state["image"] = image
|
|
105 |
|
106 |
|
107 |
image_dict = imageLoader.transform(image)
|
|
|
108 |
show_image = imageLoader.show_resize(image)
|
109 |
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
with center:
|
113 |
-
st.title("Image Captioning with VirTex model trained on RedCaps")
|
114 |
-
st.markdown("""
|
115 |
-
Caption your own images or try out some of our sample images.
|
116 |
-
You can also generate captions as if they are from specific subreddits,
|
117 |
-
as if they start with a particular prompt, or even both.
|
118 |
-
|
119 |
-
Tweet your results with `#redcaps`!
|
120 |
-
""")
|
121 |
st.image(show_image)
|
122 |
|
123 |
if sub is None and imageLoader.text_transform(cap_prompt) is not "":
|
|
|
24 |
}}
|
25 |
</style>
|
26 |
|
27 |
+
#### <red> r/{subreddit} </red> <blue> {cap_prompt} </blue> {caption}
|
28 |
""",
|
29 |
unsafe_allow_html=True,
|
30 |
)
|
|
|
105 |
|
106 |
|
107 |
image_dict = imageLoader.transform(image)
|
108 |
+
|
109 |
show_image = imageLoader.show_resize(image)
|
110 |
|
111 |
+
st.title("Image Captioning with VirTex model trained on RedCaps")
|
112 |
+
st.markdown("""
|
113 |
+
Caption your own images or try out some of our sample images.
|
114 |
+
You can also generate captions as if they are from specific subreddits,
|
115 |
+
as if they start with a particular prompt, or even both.
|
116 |
+
|
117 |
+
Tweet your results with `#redcaps`!
|
118 |
+
""")
|
119 |
+
|
120 |
+
_, center, _ = st.columns([1, 18, 1])
|
121 |
|
122 |
with center:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
st.image(show_image)
|
124 |
|
125 |
if sub is None and imageLoader.text_transform(cap_prompt) is not "":
|