wondervictor chenjoya commited on
Commit
6a710e2
·
verified ·
1 Parent(s): d4c5ca8

Fix layout requested by https://huggingface.co/spaces/ByteDance-Seed/Seed1.5-VL/discussions/9#682f06bfcc42cf9552def4ee (#13)

Browse files

- Fix layout requested by https://huggingface.co/spaces/ByteDance-Seed/Seed1.5-VL/discussions/9#682f06bfcc42cf9552def4ee (3932732d739b38d4dfacb19a0645c9b1f75267be)


Co-authored-by: Joya Chen <[email protected]>

Files changed (1) hide show
  1. app.py +62 -61
app.py CHANGED
@@ -170,70 +170,69 @@ def online_record_chat(text: str, gr_history: list, gr_webcam_images: list,
170
  inputs, gr_history, infer_history, if_thinking, temperature, online=True):
171
  yield response_message, gr.skip(), infer_history
172
 
173
-
174
  with gr.Blocks() as demo:
175
- with gr.Column():
176
- gr_title = gr.Markdown('# Seed1.5-VL')
177
- with gr.Row():
178
- gr.Markdown(
179
- """
180
- <div style="display:flex; flex-direction:column; gap:10px;">
181
- <a
182
- href="https://github.com/ByteDance-Seed/Seed1.5-VL"
183
- target="_blank"
184
- style="
185
- display: inline-flex;
186
- align-items: center;
187
- gap: 8px;
188
- white-space: nowrap;
189
- text-decoration: none;
190
- "
191
- >
192
- <img
193
- src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original.svg"
194
- alt="GitHub"
195
- width="24"
196
  >
197
- Seed1.5-VL Cookbook
198
- </a>
199
- </div>
200
- """
201
- )
202
- gr.Markdown(
203
- """
204
- <div style="display:flex; flex-direction:column; gap:10px;">
205
- <a
206
- href="https://huggingface.co/papers/2505.07062"
207
- target="_blank"
208
- style="
209
- display: inline-flex;
210
- align-items: center;
211
- gap: 8px;
212
- white-space: nowrap;
213
- text-decoration: none;
214
- "
215
- >
216
- <img
217
- src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg"
218
- alt="Paper"
219
- width="24"
220
  >
221
- Seed1.5-VL Paper
222
- </a>
223
- </div>
224
- """,
225
- )
226
- gr.Markdown(' ')
227
- gr.Markdown(' ')
228
- gr.Markdown(' ')
229
- gr.Markdown(' ')
230
- with gr.Row():
231
- gr_lang_selector = gr.Dropdown(choices=["English", "中文"],
232
- value="English",
233
- label="🌐 English Interface/中文界面",
234
- interactive=True,
235
- min_width=400,
236
- scale=0)
 
 
 
 
237
 
238
  with gr.Tabs():
239
  with gr.Tab("Offline") as gr_tab_ofl:
@@ -249,6 +248,7 @@ with gr.Blocks() as demo:
249
  fn=general_chat,
250
  type="messages",
251
  multimodal=True,
 
252
  textbox=gr.MultimodalTextbox(
253
  file_count="multiple",
254
  file_types=["image", ".mp4"],
@@ -421,6 +421,7 @@ with gr.Blocks() as demo:
421
  fn=online_record_chat,
422
  type="messages",
423
  multimodal=False,
 
424
  textbox=gr.
425
  Textbox(placeholder=label_translations[
426
  'gr_chatinterface_ol.textbox.placeholder']
 
170
  inputs, gr_history, infer_history, if_thinking, temperature, online=True):
171
  yield response_message, gr.skip(), infer_history
172
 
 
173
  with gr.Blocks() as demo:
174
+ with gr.Row():
175
+ with gr.Column():
176
+ gr_title = gr.Markdown('# Seed1.5-VL')
177
+ with gr.Row():
178
+ gr.Markdown(
179
+ """
180
+ <div style="display:flex; flex-direction:column; gap:10px;">
181
+ <a
182
+ href="https://github.com/ByteDance-Seed/Seed1.5-VL"
183
+ target="_blank"
184
+ style="
185
+ display: inline-flex;
186
+ align-items: center;
187
+ gap: 8px;
188
+ white-space: nowrap;
189
+ text-decoration: none;
190
+ "
 
 
 
 
191
  >
192
+ <img
193
+ src="https://cdn.jsdelivr.net/gh/devicons/devicon/icons/github/github-original.svg"
194
+ alt="GitHub"
195
+ width="24"
196
+ >
197
+ Seed1.5-VL Cookbook
198
+ </a>
199
+ </div>
200
+ """
201
+ )
202
+ gr.Markdown(
203
+ """
204
+ <div style="display:flex; flex-direction:column; gap:10px;">
205
+ <a
206
+ href="https://huggingface.co/papers/2505.07062"
207
+ target="_blank"
208
+ style="
209
+ display: inline-flex;
210
+ align-items: center;
211
+ gap: 8px;
212
+ white-space: nowrap;
213
+ text-decoration: none;
214
+ "
215
  >
216
+ <img
217
+ src="https://huggingface.co/front/assets/huggingface_logo-noborder.svg"
218
+ alt="Paper"
219
+ width="24"
220
+ >
221
+ Seed1.5-VL Paper
222
+ </a>
223
+ </div>
224
+ """,
225
+ )
226
+ gr.Markdown('')
227
+ gr.Markdown('')
228
+ gr.Markdown('')
229
+
230
+ gr_lang_selector = gr.Dropdown(choices=["English", "中文"],
231
+ value="English",
232
+ label="🌐 English Interface/中文界面",
233
+ interactive=True,
234
+ min_width=400,
235
+ scale=0)
236
 
237
  with gr.Tabs():
238
  with gr.Tab("Offline") as gr_tab_ofl:
 
248
  fn=general_chat,
249
  type="messages",
250
  multimodal=True,
251
+ chatbot=gr.Chatbot(height=600),
252
  textbox=gr.MultimodalTextbox(
253
  file_count="multiple",
254
  file_types=["image", ".mp4"],
 
421
  fn=online_record_chat,
422
  type="messages",
423
  multimodal=False,
424
+ chatbot=gr.Chatbot(height=600),
425
  textbox=gr.
426
  Textbox(placeholder=label_translations[
427
  'gr_chatinterface_ol.textbox.placeholder']