CosmickVisions commited on
Commit
321630c
·
verified ·
1 Parent(s): 4addefb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +41 -62
app.py CHANGED
@@ -48,77 +48,54 @@ if not os.path.exists(FAISS_INDEX_DIR):
48
  # Dictionary to store user-specific vectorstores
49
  user_vectorstores = {}
50
 
51
- # Custom CSS for Tech theme
52
  custom_css = """
53
- :root {
54
- --primary-color: #4285F4;
55
- --secondary-color: #34A853;
56
- --accent-color: #EA4335;
57
- --light-background: #F8F9FA;
58
- --dark-text: #202124;
59
- --white: #FFFFFF;
60
- --border-color: #DADCE0;
61
- --code-bg: #F1F3F4;
 
 
 
62
  }
63
 
64
- body {
65
- background-color: var(--light-background);
66
- font-family: 'Google Sans', 'Roboto', sans-serif;
 
 
 
 
 
67
  }
68
 
69
- .container {
70
- max-width: 1200px !important;
71
- margin: 0 auto !important;
72
- padding: 10px;
73
- }
74
-
75
- .header {
76
- background-color: var(--white);
77
- border-bottom: 1px solid var(--border-color);
78
- padding: 15px 0;
79
- margin-bottom: 20px;
80
- border-radius: 12px 12px 0 0;
81
- box-shadow: 0 2px 4px rgba(0,0,0,0.05);
82
- }
83
-
84
- .header-title {
85
- color: var(--primary-color);
86
- font-size: 1.8rem;
87
- font-weight: 700;
88
- text-align: center;
89
- }
90
 
91
- .header-subtitle {
92
- color: var(--dark-text);
93
- font-size: 1rem;
94
- text-align: center;
95
- margin-top: 5px;
96
  }
97
 
98
- .chat-container {
99
- border-radius: 12px !important;
100
- box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
101
- background-color: var(--white) !important;
102
- border: 1px solid var(--border-color) !important;
103
- min-height: 500px;
104
  }
105
 
106
- .tool-container {
107
- background-color: var(--white);
108
- border-radius: 12px;
109
- box-shadow: 0 4px 6px rgba(0,0,0,0.1);
110
- padding: 15px;
111
- margin-bottom: 20px;
112
  }
113
 
114
- .code-block {
115
- background-color: var(--code-bg);
116
- padding: 12px;
117
- border-radius: 8px;
118
- font-family: 'Roboto Mono', monospace;
119
- overflow-x: auto;
120
- margin: 10px 0;
121
- border-left: 3px solid var(--primary-color);
122
  }
123
  """
124
 
@@ -648,13 +625,15 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo:
648
 
649
  # Add footer with attribution
650
  gr.HTML("""
651
- <div style="text-align: center; margin-top: 20px; padding: 10px; color: #666; font-size: 0.8rem; border-top: 1px solid #eee;">
652
- Created by Calvin Allen Crawford
 
653
  </div>
654
  """)
655
 
656
- # Launch the app
657
  if __name__ == "__main__":
 
658
  demo.launch()
659
 
660
  # Add new helper functions
 
48
  # Dictionary to store user-specific vectorstores
49
  user_vectorstores = {}
50
 
51
+ # Custom CSS for Tech theme with modern UI enhancements
52
  custom_css = """
53
+ @import url('shared-base.css');
54
+
55
+ /* Tech Vision Specific */
56
+ .code-block {
57
+ background: var(--surface-2);
58
+ border-radius: var(--radius-md);
59
+ padding: var(--spacing-md);
60
+ color: var(--text-color);
61
+ font-family: 'JetBrains Mono', monospace;
62
+ margin: var(--spacing-md) 0;
63
+ border-left: 3px solid var(--accent-color);
64
+ box-shadow: var(--shadow-sm);
65
  }
66
 
67
+ .stats-card {
68
+ background: var(--surface-2);
69
+ color: var(--text-color);
70
+ padding: var(--spacing-md);
71
+ border-radius: var(--radius-md);
72
+ margin: var(--spacing-md) 0;
73
+ border: 1px solid var(--border-color);
74
+ box-shadow: var(--shadow-sm);
75
  }
76
 
77
+ /* Tech-specific accents */
78
+ .function-name { color: var(--accent-color); }
79
+ .keyword { color: var(--accent-color-alt); }
80
+ .string { color: var(--text-color-secondary); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
+ /* Custom Scrollbar */
83
+ ::-webkit-scrollbar {
84
+ width: 8px;
85
+ height: 8px;
 
86
  }
87
 
88
+ ::-webkit-scrollbar-track {
89
+ background: var(--surface-1);
 
 
 
 
90
  }
91
 
92
+ ::-webkit-scrollbar-thumb {
93
+ background: var(--accent-color);
94
+ border-radius: var(--radius-sm);
 
 
 
95
  }
96
 
97
+ ::-webkit-scrollbar-thumb:hover {
98
+ background: var(--accent-color-alt);
 
 
 
 
 
 
99
  }
100
  """
101
 
 
625
 
626
  # Add footer with attribution
627
  gr.HTML("""
628
+ <div style="text-align: center; margin-top: 20px; padding: 20px; color: #666; font-size: 0.9rem; border-top: 1px solid #eee;">
629
+ Created by Calvin Allen-Crawford<br>
630
+ <span style="font-style: italic; font-size: 0.8rem;">Founder of Cosmick Visions</span>
631
  </div>
632
  """)
633
 
634
+ # Launch the app with modern UI
635
  if __name__ == "__main__":
636
+ demo = create_interface()
637
  demo.launch()
638
 
639
  # Add new helper functions