asthaaa300 commited on
Commit
68dc338
·
verified ·
1 Parent(s): 167198f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +49 -10
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import os
3
  from huggingface_hub import InferenceClient
@@ -82,6 +83,7 @@ def handle_example_click(example_query: str):
82
  """Handle example query click by returning the query and empty chat history"""
83
  return example_query, []
84
 
 
85
  # SVG Definitions
86
  WAVE_SVG = """
87
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none">
@@ -309,25 +311,62 @@ textarea {
309
  .gr-button {
310
  font-family: 'Ubuntu', sans-serif !important;
311
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  """
313
 
314
  # Main application
 
 
315
  with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
316
  # Header with wave background and maritime icons
317
  gr.HTML(f"""
318
- <div class="wave-background">
319
- {WAVE_SVG}
320
- </div>
321
- <div class="header-container">
322
- <h1 class="header-title">Maritime Legal Compliance</h1>
323
- <div class="maritime-icons">
324
- {MARITIME_ICONS}
 
 
 
 
 
 
 
325
  </div>
326
- <p class="header-subtitle">AI-powered assistance for Indian maritime law queries</p>
327
- <p class="header-subtitle">This chatbot uses Fine-tuned LLAMA-3.1 model personalised specifically to provide assistance with Indian maritime legal queries.</p>
328
  </div>
 
 
 
329
  """)
330
 
 
 
331
  with gr.Row():
332
  # Enhanced sidebar with graphics
333
  with gr.Column(scale=1, elem_classes="sidebar"):
@@ -402,4 +441,4 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
402
  )
403
 
404
  if __name__ == "__main__":
405
- demo.launch()
 
1
+
2
  import gradio as gr
3
  import os
4
  from huggingface_hub import InferenceClient
 
83
  """Handle example query click by returning the query and empty chat history"""
84
  return example_query, []
85
 
86
+
87
  # SVG Definitions
88
  WAVE_SVG = """
89
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320" preserveAspectRatio="none">
 
311
  .gr-button {
312
  font-family: 'Ubuntu', sans-serif !important;
313
  }
314
+
315
+ .maritime-images {
316
+ display: grid;
317
+ grid-template-columns: repeat(3, 1fr);
318
+ gap: 1rem;
319
+ margin: 1.5rem auto;
320
+ max-width: 1200px;
321
+ padding: 0 1rem;
322
+ }
323
+
324
+ .maritime-image {
325
+ width: 100%;
326
+ height: 200px;
327
+ object-fit: cover;
328
+ border-radius: 8px;
329
+ border: 2px solid #e6f3ff;
330
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
331
+ transition: transform 0.3s ease;
332
+ filter: contrast(110%) saturate(110%);
333
+ }
334
+
335
+ .maritime-image:hover {
336
+ transform: scale(1.02);
337
+ }
338
+
339
  """
340
 
341
  # Main application
342
+ # Header with wave background and maritime icons
343
+
344
  with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
345
  # Header with wave background and maritime icons
346
  gr.HTML(f"""
347
+ <div class="wave-background">
348
+ {WAVE_SVG}
349
+ </div>
350
+ <div class="header-container">
351
+ <h1 class="header-title">Maritime Legal Compliance</h1>
352
+ <div class="maritime-images">
353
+ <div class="maritime-image-container">
354
+ <img src="images/busy.jpg" alt="Modern port with cargo vessels" class="maritime-image" onerror="this.src='/api/placeholder/800/450'">
355
+ </div>
356
+ <div class="maritime-image-container">
357
+ <img src="images/cargo.jpg" alt="Container ship at sea" class="maritime-image" onerror="this.src='/api/placeholder/800/450'">
358
+ </div>
359
+ <div class="maritime-image-container">
360
+ <img src="images/full.jpg" alt="Coastal waterway" class="maritime-image" onerror="this.src='/api/placeholder/800/450'">
361
  </div>
 
 
362
  </div>
363
+ <p class="header-subtitle">AI-powered assistance for Indian maritime law queries</p>
364
+ <p class="header-subtitle">This chatbot uses Fine-tuned LLAMA-3.1 model personalised specifically to provide assistance with Indian maritime legal queries.</p>
365
+ </div>
366
  """)
367
 
368
+
369
+
370
  with gr.Row():
371
  # Enhanced sidebar with graphics
372
  with gr.Column(scale=1, elem_classes="sidebar"):
 
441
  )
442
 
443
  if __name__ == "__main__":
444
+ demo.launch()