Ninad077 commited on
Commit
0654519
·
verified ·
1 Parent(s): 9a77024

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +61 -4
app.py CHANGED
@@ -106,7 +106,9 @@ if selected_option == "External users":
106
  upload_option = st.radio("", ["Upload Spreadsheet (CSV or Excel)", "Google Sheets URL"])
107
 
108
 
109
- html_subject = """
 
 
110
  <html>
111
  <head>
112
  <style>
@@ -158,8 +160,7 @@ if selected_option == "External users":
158
  </html>
159
  """
160
 
161
- st.markdown(html_subject, unsafe_allow_html=True)
162
- if upload_option == "Upload Spreadsheet (CSV or Excel)":
163
  uploaded_file = st.file_uploader("", type=["csv", "xlsx"])
164
  if uploaded_file:
165
  # Load the data
@@ -168,8 +169,64 @@ if selected_option == "External users":
168
  else:
169
  df = pd.read_excel(uploaded_file)
170
 
 
 
 
171
  elif upload_option == "Google Sheets URL":
172
- sheet_url = st.text_input("Enter Google Sheets URL")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  if sheet_url:
174
  try:
175
  # Define the scope
 
106
  upload_option = st.radio("", ["Upload Spreadsheet (CSV or Excel)", "Google Sheets URL"])
107
 
108
 
109
+
110
+ if upload_option == "Upload Spreadsheet (CSV or Excel)":
111
+ html_subject = """
112
  <html>
113
  <head>
114
  <style>
 
160
  </html>
161
  """
162
 
163
+ st.markdown(html_subject, unsafe_allow_html=True)
 
164
  uploaded_file = st.file_uploader("", type=["csv", "xlsx"])
165
  if uploaded_file:
166
  # Load the data
 
169
  else:
170
  df = pd.read_excel(uploaded_file)
171
 
172
+ st.write("")
173
+ st.write("")
174
+
175
  elif upload_option == "Google Sheets URL":
176
+ html_subject = """
177
+ <html>
178
+ <head>
179
+ <style>
180
+ .button {
181
+ display: inline-block;
182
+ padding: 10px 20px;
183
+ border-radius: 12px;
184
+ background: linear-gradient(to bottom, #f8f9fa, #e0e0e0);
185
+ box-shadow:
186
+ 0 6px 12px rgba(0, 0, 0, 0.3),
187
+ 0 8px 16px rgba(0, 0, 0, 0.2),
188
+ inset 0 -2px 4px rgba(255, 255, 255, 0.6);
189
+ text-align: center;
190
+ position: relative;
191
+ transform: translateY(4px);
192
+ transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
193
+ cursor: pointer;
194
+ user-select: none;
195
+ }
196
+ .button:hover {
197
+ box-shadow:
198
+ 0 8px 16px rgba(0, 0, 0, 0.3),
199
+ 0 12px 24px rgba(0, 0, 0, 0.2);
200
+ transform: translateY(2px);
201
+ }
202
+ .button:active {
203
+ box-shadow:
204
+ 0 4px 8px rgba(0, 0, 0, 0.3),
205
+ 0 6px 12px rgba(0, 0, 0, 0.2);
206
+ transform: translateY(0);
207
+ }
208
+ </style>
209
+ </head>
210
+ <body>
211
+ <div class="button">
212
+ <h3 style="
213
+ font-size: 20px;
214
+ color: #ffffff;
215
+ background-image: linear-gradient(to right, #800000, #ff0000, #ffdab9);
216
+ background-clip: text;
217
+ -webkit-background-clip: text;
218
+ text-fill-color: transparent;
219
+ -webkit-text-fill-color: transparent;
220
+ margin: 0;
221
+ text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
222
+ ">Enter Google sheets url</h3>
223
+ </div>
224
+ </body>
225
+ </html>
226
+ """
227
+
228
+ st.markdown(html_subject, unsafe_allow_html=True)
229
+ sheet_url = st.text_input("")
230
  if sheet_url:
231
  try:
232
  # Define the scope