Artificial-superintelligence commited on
Commit
9a7d198
·
verified ·
1 Parent(s): 3f85e37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +51 -58
app.py CHANGED
@@ -42,12 +42,12 @@ st.set_page_config(page_title="Advanced AI Code Assistant", page_icon="💻", la
42
 
43
  st.markdown("""
44
  <style>
45
- @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
46
 
47
  body {
48
- font-family: 'Poppins', sans-serif;
49
- background-color: #2d2d2d;
50
- color: #e0e0e0;
51
  }
52
  .stApp {
53
  max-width: 1200px;
@@ -55,106 +55,99 @@ st.markdown("""
55
  padding: 2rem;
56
  }
57
  .main-container {
58
- background: #333;
59
- border-radius: 20px;
60
- padding: 3rem;
61
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
62
  }
63
  h1 {
64
- font-size: 3rem;
65
- font-weight: 700;
66
- color: #e0e0e0;
67
  text-align: center;
68
  margin-bottom: 1rem;
69
- text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
70
  }
71
  .subtitle {
72
- font-size: 1.2rem;
73
  text-align: center;
74
- color: #b0bec5;
75
- margin-bottom: 3rem;
76
  }
77
  .stTextArea textarea {
78
- border: 2px solid #444;
79
- border-radius: 12px;
80
  font-size: 1rem;
81
- padding: 1rem;
82
- transition: all 0.3s ease;
83
- background: #1e1e1e;
84
- color: #e0e0e0;
85
- box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
86
  }
87
  .stTextArea textarea:focus {
88
- border-color: #82aaff;
89
- box-shadow: 0 0 0 3px rgba(130, 170, 255, 0.5);
90
  }
91
  .stButton button {
92
- background-color: #82aaff;
93
- color: #1e1e1e;
94
  border: none;
95
- border-radius: 12px;
96
- font-size: 1.1rem;
97
- font-weight: 600;
98
- padding: 0.75rem 2rem;
99
- transition: all 0.3s ease;
100
- width: 100%;
101
- box-shadow: 0 4px 6px rgba(130, 170, 255, 0.3);
102
  }
103
  .stButton button:hover {
104
- background-color: #6495ed;
105
  transform: translateY(-2px);
106
- box-shadow: 0 6px 8px rgba(130, 170, 255, 0.4);
107
  }
108
  .output-container {
109
- background: #2a2a2a;
110
- border-radius: 12px;
111
- padding: 1.5rem;
112
- margin-top: 2rem;
113
- border: 1px solid #444;
114
  }
115
  .code-block {
116
- background-color: #1e1e1e;
117
- border-radius: 12px;
118
- padding: 1.5rem;
119
  margin-top: 1rem;
120
  overflow-x: auto;
121
  }
122
  .stAlert {
123
- background-color: #4e5b62;
124
- color: #e0e0e0;
125
- border-radius: 12px;
126
  border: none;
127
- padding: 1rem 1.5rem;
128
  margin-bottom: 1rem;
129
  }
130
  .stSpinner {
131
- color: #82aaff;
132
  }
133
  /* Custom scrollbar */
134
  ::-webkit-scrollbar {
135
  width: 8px;
136
- height: 8px;
137
  }
138
  ::-webkit-scrollbar-track {
139
- background: #333;
140
  border-radius: 4px;
141
  }
142
  ::-webkit-scrollbar-thumb {
143
- background: #555;
144
  border-radius: 4px;
145
  }
146
  ::-webkit-scrollbar-thumb:hover {
147
- background: #777;
148
  }
149
  .source {
150
  font-family: 'Fira Code', monospace;
151
  font-size: 0.9rem;
152
- line-height: 1.4;
153
  }
154
  .source .linenos {
155
- color: #6c6c6c;
156
- padding-right: 10px;
157
- border-right: 1px solid #444;
158
  user-select: none;
159
  }
160
  .source pre {
@@ -168,7 +161,7 @@ st.markdown('<div class="main-container">', unsafe_allow_html=True)
168
  st.title("💻 Advanced AI Code Assistant")
169
  st.markdown('<p class="subtitle">Powered by Google Gemini - Expert-level coding solutions</p>', unsafe_allow_html=True)
170
 
171
- prompt = st.text_area("What advanced coding challenge can I assist you with today?", height=120)
172
 
173
  if st.button("Generate Expert Code"):
174
  if prompt.strip() == "":
@@ -194,7 +187,7 @@ if st.button("Generate Expert Code"):
194
  st.markdown('</div>', unsafe_allow_html=True)
195
 
196
  st.markdown("""
197
- <div style='text-align: center; margin-top: 2rem; color: #b0bec5;'>
198
  Crafted with ❤️ by Your Advanced AI Code Assistant
199
  </div>
200
  """, unsafe_allow_html=True)
 
42
 
43
  st.markdown("""
44
  <style>
45
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
46
 
47
  body {
48
+ font-family: 'Roboto', sans-serif;
49
+ background-color: #e9ecef;
50
+ color: #212529;
51
  }
52
  .stApp {
53
  max-width: 1200px;
 
55
  padding: 2rem;
56
  }
57
  .main-container {
58
+ background: #ffffff;
59
+ border-radius: 12px;
60
+ padding: 2rem;
61
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
62
  }
63
  h1 {
64
+ font-size: 2.5rem;
65
+ font-weight: 600;
66
+ color: #0d6efd;
67
  text-align: center;
68
  margin-bottom: 1rem;
 
69
  }
70
  .subtitle {
71
+ font-size: 1rem;
72
  text-align: center;
73
+ color: #6c757d;
74
+ margin-bottom: 2rem;
75
  }
76
  .stTextArea textarea {
77
+ border: 1px solid #ced4da;
78
+ border-radius: 8px;
79
  font-size: 1rem;
80
+ padding: 0.75rem;
81
+ transition: border-color 0.3s;
 
 
 
82
  }
83
  .stTextArea textarea:focus {
84
+ border-color: #0d6efd;
85
+ outline: none;
86
  }
87
  .stButton button {
88
+ background-color: #0d6efd;
89
+ color: white;
90
  border: none;
91
+ border-radius: 8px;
92
+ font-size: 1rem;
93
+ font-weight: 500;
94
+ padding: 0.5rem 1.5rem;
95
+ cursor: pointer;
96
+ transition: background-color 0.3s, transform 0.2s;
 
97
  }
98
  .stButton button:hover {
99
+ background-color: #0b5ed7;
100
  transform: translateY(-2px);
 
101
  }
102
  .output-container {
103
+ background: #f8f9fa;
104
+ border-radius: 8px;
105
+ padding: 1rem;
106
+ margin-top: 1.5rem;
107
+ border: 1px solid #dee2e6;
108
  }
109
  .code-block {
110
+ background-color: #343a40;
111
+ border-radius: 8px;
112
+ padding: 1rem;
113
  margin-top: 1rem;
114
  overflow-x: auto;
115
  }
116
  .stAlert {
117
+ background-color: #cce5ff;
118
+ color: #004085;
119
+ border-radius: 8px;
120
  border: none;
121
+ padding: 1rem;
122
  margin-bottom: 1rem;
123
  }
124
  .stSpinner {
125
+ color: #0d6efd;
126
  }
127
  /* Custom scrollbar */
128
  ::-webkit-scrollbar {
129
  width: 8px;
 
130
  }
131
  ::-webkit-scrollbar-track {
132
+ background: #f1f3f5;
133
  border-radius: 4px;
134
  }
135
  ::-webkit-scrollbar-thumb {
136
+ background: #868e96;
137
  border-radius: 4px;
138
  }
139
  ::-webkit-scrollbar-thumb:hover {
140
+ background: #495057;
141
  }
142
  .source {
143
  font-family: 'Fira Code', monospace;
144
  font-size: 0.9rem;
145
+ line-height: 1.5;
146
  }
147
  .source .linenos {
148
+ color: #6c757d;
149
+ padding-right: 8px;
150
+ border-right: 1px solid #495057;
151
  user-select: none;
152
  }
153
  .source pre {
 
161
  st.title("💻 Advanced AI Code Assistant")
162
  st.markdown('<p class="subtitle">Powered by Google Gemini - Expert-level coding solutions</p>', unsafe_allow_html=True)
163
 
164
+ prompt = st.text_area("What advanced coding challenge can I assist you with today?", height=100)
165
 
166
  if st.button("Generate Expert Code"):
167
  if prompt.strip() == "":
 
187
  st.markdown('</div>', unsafe_allow_html=True)
188
 
189
  st.markdown("""
190
+ <div style='text-align: center; margin-top: 2rem; color: #6c757d;'>
191
  Crafted with ❤️ by Your Advanced AI Code Assistant
192
  </div>
193
  """, unsafe_allow_html=True)