shukdevdattaEX commited on
Commit
b589c44
Β·
verified Β·
1 Parent(s): a4b7006

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -48
app.py CHANGED
@@ -274,53 +274,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as app:
274
  with gr.Row(elem_id="main-container"):
275
  with gr.Column():
276
  with gr.Tabs():
277
- # Chat Tab
278
- with gr.Tab("πŸ’¬ Chat Interface", elem_classes=["tab-nav"]):
279
- gr.HTML("""
280
- <div class='info-box'>
281
- <strong>🎯 What can I do?</strong><br>
282
- β€’ Analyze images, documents, and charts<br>
283
- β€’ Perform OCR and text extraction<br>
284
- β€’ Reason through complex problems<br>
285
- β€’ Answer questions about visual content<br>
286
- β€’ Process multi-image documents
287
- </div>
288
- """)
289
-
290
- chatbot = gr.Chatbot(
291
- label="Conversation",
292
- height=500,
293
- show_copy_button=True,
294
- avatar_images=(None, "https://www.nvidia.com/favicon.ico"),
295
- elem_classes=["chatbot"]
296
- )
297
-
298
- with gr.Row():
299
- msg = gr.Textbox(
300
- label="Your Message",
301
- placeholder="Ask me anything about images, documents, or reasoning tasks...",
302
- lines=3,
303
- scale=4
304
- )
305
-
306
- with gr.Row():
307
- images = gr.File(
308
- label="πŸ“Ž Upload Images/Documents (Multi-image support)",
309
- file_count="multiple",
310
- file_types=["image"],
311
- scale=3
312
- )
313
-
314
- with gr.Row():
315
- submit_btn = gr.Button("πŸš€ Send", variant="primary", scale=2, elem_classes=["primary"])
316
- clear_btn = gr.Button("πŸ—‘οΈ Clear", variant="secondary", scale=1, elem_classes=["secondary"])
317
-
318
- reasoning_display = gr.Textbox(
319
- label="🧠 Reasoning Process (when enabled)",
320
- lines=6,
321
- interactive=False
322
- )
323
-
324
  # Settings Tab
325
  with gr.Tab("βš™οΈ Settings", elem_classes=["tab-nav"]):
326
  gr.HTML("""
@@ -373,7 +327,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as app:
373
  label="πŸ“ Max Tokens",
374
  info="Maximum length of response"
375
  )
376
-
377
  # Examples Tab
378
  with gr.Tab("πŸ“š Examples & Capabilities", elem_classes=["tab-nav"]):
379
  gr.HTML("""
@@ -425,6 +379,53 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as app:
425
  </div>
426
  """)
427
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  # About Tab
429
  with gr.Tab("ℹ️ About", elem_classes=["tab-nav"]):
430
  gr.Markdown("""
 
274
  with gr.Row(elem_id="main-container"):
275
  with gr.Column():
276
  with gr.Tabs():
277
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
278
  # Settings Tab
279
  with gr.Tab("βš™οΈ Settings", elem_classes=["tab-nav"]):
280
  gr.HTML("""
 
327
  label="πŸ“ Max Tokens",
328
  info="Maximum length of response"
329
  )
330
+
331
  # Examples Tab
332
  with gr.Tab("πŸ“š Examples & Capabilities", elem_classes=["tab-nav"]):
333
  gr.HTML("""
 
379
  </div>
380
  """)
381
 
382
+ # Chat Tab
383
+ with gr.Tab("πŸ’¬ Chat Interface", elem_classes=["tab-nav"]):
384
+ gr.HTML("""
385
+ <div class='info-box'>
386
+ <strong>🎯 What can I do?</strong><br>
387
+ β€’ Analyze images, documents, and charts<br>
388
+ β€’ Perform OCR and text extraction<br>
389
+ β€’ Reason through complex problems<br>
390
+ β€’ Answer questions about visual content<br>
391
+ β€’ Process multi-image documents
392
+ </div>
393
+ """)
394
+
395
+ chatbot = gr.Chatbot(
396
+ label="Conversation",
397
+ height=500,
398
+ show_copy_button=True,
399
+ avatar_images=(None, "https://www.nvidia.com/favicon.ico"),
400
+ elem_classes=["chatbot"]
401
+ )
402
+
403
+ with gr.Row():
404
+ msg = gr.Textbox(
405
+ label="Your Message",
406
+ placeholder="Ask me anything about images, documents, or reasoning tasks...",
407
+ lines=3,
408
+ scale=4
409
+ )
410
+
411
+ with gr.Row():
412
+ images = gr.File(
413
+ label="πŸ“Ž Upload Images/Documents (Multi-image support)",
414
+ file_count="multiple",
415
+ file_types=["image"],
416
+ scale=3
417
+ )
418
+
419
+ with gr.Row():
420
+ submit_btn = gr.Button("πŸš€ Send", variant="primary", scale=2, elem_classes=["primary"])
421
+ clear_btn = gr.Button("πŸ—‘οΈ Clear", variant="secondary", scale=1, elem_classes=["secondary"])
422
+
423
+ reasoning_display = gr.Textbox(
424
+ label="🧠 Reasoning Process (when enabled)",
425
+ lines=6,
426
+ interactive=False
427
+ )
428
+
429
  # About Tab
430
  with gr.Tab("ℹ️ About", elem_classes=["tab-nav"]):
431
  gr.Markdown("""