zamborg commited on
Commit
02c1c03
·
1 Parent(s): 413d70e

moved footer around

Browse files
Files changed (2) hide show
  1. app.py +1 -41
  2. model.py +33 -0
app.py CHANGED
@@ -46,6 +46,7 @@ st.sidebar.markdown(
46
  Share your results on twitter with #redcaps or with a friend*.
47
  """
48
  )
 
49
 
50
  with st.spinner("Loading Model"):
51
  virtexModel, imageLoader, sample_images, valid_subs = create_objects()
@@ -132,44 +133,3 @@ with center:
132
  for i in range(num_captions):
133
  gen_show_caption(sub, imageLoader.text_transform(cap_prompt))
134
 
135
-
136
- footer="""<style>
137
- a:link , a:visited{
138
- color: blue;
139
- background-color: transparent;
140
- text-decoration: underline;
141
- }
142
-
143
- a:hover, a:active {
144
- color: red;
145
- background-color: transparent;
146
- text-decoration: underline;
147
- }
148
-
149
- .footer {
150
- position: fixed;
151
- left: 0;
152
- bottom: 0;
153
- width: 100%;
154
- background-color: white;
155
- color: black;
156
- text-align: center;
157
- }
158
- </style>
159
- <div class="footer">
160
- # <br></br>
161
- # <br></br>
162
- # <br></br>
163
- # <br></br>
164
- # <br></br>
165
- # <br></br>
166
- <p>
167
- *Please note that this model was explicitly not trained on images of people, and as a result is not designed to caption images with humans.
168
-
169
- This demo accompanies our paper RedCaps.
170
-
171
- Created by Karan Desai, Gaurav Kaul, Zubin Aysola, Justin Johnson
172
- </p>
173
- </div>
174
- """
175
- st.sidebar.markdown(footer,unsafe_allow_html=True)
 
46
  Share your results on twitter with #redcaps or with a friend*.
47
  """
48
  )
49
+ st.sidebar.markdown(footer,unsafe_allow_html=True)
50
 
51
  with st.spinner("Loading Model"):
52
  virtexModel, imageLoader, sample_images, valid_subs = create_objects()
 
133
  for i in range(num_captions):
134
  gen_show_caption(sub, imageLoader.text_transform(cap_prompt))
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
model.py CHANGED
@@ -149,3 +149,36 @@ def create_objects():
149
  valid_subs.insert(0, None)
150
  return virtexModel, imageLoader, sample_images, valid_subs
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  valid_subs.insert(0, None)
150
  return virtexModel, imageLoader, sample_images, valid_subs
151
 
152
+ footer="""<style>
153
+ a:link , a:visited{
154
+ color: blue;
155
+ background-color: transparent;
156
+ text-decoration: underline;
157
+ }
158
+
159
+ a:hover, a:active {
160
+ color: red;
161
+ background-color: transparent;
162
+ text-decoration: underline;
163
+ }
164
+
165
+ .footer {
166
+ position: fixed;
167
+ left: 0;
168
+ bottom: 0;
169
+ width: 100%;
170
+ background-color: white;
171
+ color: black;
172
+ text-align: center;
173
+ }
174
+ </style>
175
+ <div class="footer">
176
+ <p>
177
+ *Please note that this model was explicitly not trained on images of people, and as a result is not designed to caption images with humans.
178
+
179
+ This demo accompanies our paper RedCaps.
180
+
181
+ Created by Karan Desai, Gaurav Kaul, Zubin Aysola, Justin Johnson
182
+ </p>
183
+ </div>
184
+ """