Nipun Claude commited on
Commit
ace8864
Β·
1 Parent(s): 2c04b84

Transform UI to closely match mockup design

Browse files

Major mockup alignment:
- Add workflow steps section with numbered progress indicators
- Implement proper container structure with white background
- Enhanced sidebar with detailed dataset information matching mockup
- Better chat input styling with focus states and proper borders

Visual improvements:
- Workflow steps: Natural Language Query β†’ Code Generation β†’ Visualization
- Professional dataset info section with time range and record counts
- Improved typography and spacing throughout interface
- Better visual hierarchy with proper container management

Layout structure:
- Main chat container with padding and background styling
- Cleaner sidebar organization and information display
- More academic and professional appearance matching design vision

πŸ€– Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Files changed (1) hide show
  1. app.py +43 -10
app.py CHANGED
@@ -195,11 +195,18 @@ st.markdown("""
195
  border: 1px solid #f5c2c7;
196
  }
197
 
198
- /* Chat input */
199
  .stChatInput {
200
- border-radius: 6px;
201
- border: 1px solid #ced4da;
202
  background: #ffffff;
 
 
 
 
 
 
 
203
  }
204
 
205
  /* Button */
@@ -574,13 +581,14 @@ with st.sidebar:
574
 
575
  st.markdown("---")
576
 
577
- # Dataset Info Section
578
  st.markdown("### Dataset Info")
579
  st.markdown("""
580
- <div style='background-color: #f1f5f9; padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem;'>
581
- <h4 style='margin: 0 0 0.25rem 0; color: #1e293b; font-size: 0.9rem;'>PM2.5 Air Quality Data</h4>
582
- <p style='margin: 0.125rem 0; font-size: 0.75rem;'><strong>Locations:</strong> Gujarat cities</p>
583
- <p style='margin: 0.125rem 0; font-size: 0.75rem;'><strong>Parameters:</strong> PM2.5, PM10</p>
 
584
  </div>
585
  """, unsafe_allow_html=True)
586
 
@@ -616,7 +624,25 @@ with st.sidebar:
616
  except AttributeError:
617
  st.experimental_rerun()
618
 
619
- # Main content area - removed quick prompts section from here as it's now in sidebar
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
620
 
621
  # Initialize chat history and processing state
622
  if "responses" not in st.session_state:
@@ -692,7 +718,11 @@ def show_processing_indicator(model_name, question):
692
  </div>
693
  """, unsafe_allow_html=True)
694
 
695
- # Main chat container
 
 
 
 
696
  chat_container = st.container()
697
 
698
  with chat_container:
@@ -831,6 +861,9 @@ if st.session_state.get("processing"):
831
 
832
  st.rerun()
833
 
 
 
 
834
  # Minimal auto-scroll - only scroll when processing
835
  if st.session_state.get("processing"):
836
  st.markdown("<script>scrollToBottom();</script>", unsafe_allow_html=True)
 
195
  border: 1px solid #f5c2c7;
196
  }
197
 
198
+ /* Chat input styling like mockup */
199
  .stChatInput {
200
+ border-radius: 8px;
201
+ border: 1px solid #d1d5db;
202
  background: #ffffff;
203
+ padding: 0.75rem 1rem;
204
+ font-size: 1rem;
205
+ }
206
+
207
+ .stChatInput:focus {
208
+ border-color: #3b82f6;
209
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
210
  }
211
 
212
  /* Button */
 
581
 
582
  st.markdown("---")
583
 
584
+ # Dataset Info Section (matching mockup)
585
  st.markdown("### Dataset Info")
586
  st.markdown("""
587
+ <div style='background-color: #f1f5f9; padding: 1rem; border-radius: 8px; margin-bottom: 1.5rem;'>
588
+ <h4 style='margin: 0 0 0.5rem 0; color: #1e293b; font-weight: 600;'>PM2.5 Air Quality Data</h4>
589
+ <p style='margin: 0.25rem 0; font-size: 0.875rem;'><strong>Time Range:</strong> Jan 2023 - Dec 2023</p>
590
+ <p style='margin: 0.25rem 0; font-size: 0.875rem;'><strong>Locations:</strong> 15 cities in Gujarat</p>
591
+ <p style='margin: 0.25rem 0; font-size: 0.875rem;'><strong>Records:</strong> 13,140 measurements</p>
592
  </div>
593
  """, unsafe_allow_html=True)
594
 
 
624
  except AttributeError:
625
  st.experimental_rerun()
626
 
627
+ # Workflow steps section (like in mockup)
628
+ st.markdown("""
629
+ <div style='background: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 1rem 2rem; display: flex; gap: 1rem; margin-bottom: 1rem;'>
630
+ <div style='display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; background: #dcfce7; color: #166534;'>
631
+ <div style='width: 20px; height: 20px; border-radius: 50%; background: #22c55e; color: white; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600;'>1</div>
632
+ <span>Natural Language Query</span>
633
+ </div>
634
+ <div style='margin: 0 1rem; color: #9ca3af;'>β†’</div>
635
+ <div style='display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; background: #dcfce7; color: #166534;'>
636
+ <div style='width: 20px; height: 20px; border-radius: 50%; background: #22c55e; color: white; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600;'>2</div>
637
+ <span>Code Generation</span>
638
+ </div>
639
+ <div style='margin: 0 1rem; color: #9ca3af;'>β†’</div>
640
+ <div style='display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.875rem; font-weight: 500; background: #dbeafe; color: #1d4ed8;'>
641
+ <div style='width: 20px; height: 20px; border-radius: 50%; background: #3b82f6; color: white; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 600;'>3</div>
642
+ <span>Visualization</span>
643
+ </div>
644
+ </div>
645
+ """, unsafe_allow_html=True)
646
 
647
  # Initialize chat history and processing state
648
  if "responses" not in st.session_state:
 
718
  </div>
719
  """, unsafe_allow_html=True)
720
 
721
+ # Main chat container with mockup styling
722
+ st.markdown("""
723
+ <div style='background: white; min-height: 60vh; padding: 1.5rem;'>
724
+ """, unsafe_allow_html=True)
725
+
726
  chat_container = st.container()
727
 
728
  with chat_container:
 
861
 
862
  st.rerun()
863
 
864
+ # Close chat container
865
+ st.markdown("</div>", unsafe_allow_html=True)
866
+
867
  # Minimal auto-scroll - only scroll when processing
868
  if st.session_state.get("processing"):
869
  st.markdown("<script>scrollToBottom();</script>", unsafe_allow_html=True)