Vlad Bastina commited on
Commit
be0c8bf
·
1 Parent(s): 6843142

style and description

Browse files
Files changed (2) hide show
  1. app_generated.py +10 -2
  2. style.css +32 -0
app_generated.py CHANGED
@@ -339,12 +339,20 @@ def load_css(file_name):
339
  st.error(f"CSS file not found: {file_name}. Make sure it's in the same directory as app.py.")
340
  except Exception as e:
341
  st.error(f"Error loading CSS file {file_name}: {e}")
342
-
 
 
 
 
 
 
343
  load_css("style.css")
344
 
345
  # Streamlit Interface
346
  st.title("Data Analysis Agent Interface")
347
 
 
 
348
  st.sidebar.markdown(
349
  f"""
350
  <div style="text-align: center;">
@@ -380,7 +388,7 @@ def process_query():
380
  if len(user_query.strip()) == 0:
381
  st.error("Please enter a query.")
382
  return
383
- elif not re.match("^[a-zA-Z0-9 ]*$", user_query):
384
  st.error("Special characters are not allowed. Please use only letters and numbers.")
385
  return
386
  # Step 1: Generate and execute code to get the data
 
339
  st.error(f"CSS file not found: {file_name}. Make sure it's in the same directory as app.py.")
340
  except Exception as e:
341
  st.error(f"Error loading CSS file {file_name}: {e}")
342
+
343
+
344
+ st.markdown("""
345
+ <link rel="preconnect" href="https://fonts.googleapis.com">
346
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
347
+ <link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet">
348
+ """, unsafe_allow_html=True)
349
  load_css("style.css")
350
 
351
  # Streamlit Interface
352
  st.title("Data Analysis Agent Interface")
353
 
354
+ st.write(" In this demo, you'll explore a sample CSV file containing sales data—such as product names, regions, dates, and revenue figures. Simply type in natural language questions like “What were the best-selling products in March?” or “How did sales vary by region?” and the tool will instantly generate clear reports and visualizations. No technical skills needed—just ask and explore.")
355
+
356
  st.sidebar.markdown(
357
  f"""
358
  <div style="text-align: center;">
 
388
  if len(user_query.strip()) == 0:
389
  st.error("Please enter a query.")
390
  return
391
+ elif not re.match("^[a-zA-Z0-9!?. ]*$", user_query):
392
  st.error("Special characters are not allowed. Please use only letters and numbers.")
393
  return
394
  # Step 1: Generate and execute code to get the data
style.css CHANGED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ h1, h2, h3, h4, h5, h6 {
2
+ font-family: "Space Grotesk", sans-serif !important;
3
+ font-optical-sizing: auto !important;
4
+ font-weight: 700 !important;
5
+ font-style: normal !important;
6
+ }
7
+
8
+ h1, h2 {
9
+ letter-spacing: -1px !important;
10
+ }
11
+
12
+ h1 {
13
+ font-size: 36px !important;
14
+ }
15
+
16
+ h2 {
17
+ font-size: 27px !important;
18
+ }
19
+
20
+ .st-emotion-cache-1dp5vir {
21
+ background-image: linear-gradient(90deg, rgb(65, 105, 225), rgb(0, 255, 255)) !important;
22
+ }
23
+
24
+ body {
25
+ font-family: 'Inter Tight', Arial, Helvetica, sans-serif !important;
26
+ font-size: 14px !important;
27
+ text-align: left !important;
28
+ }
29
+
30
+ p , textarea {
31
+ font-family: 'Inter Tight', Arial, Helvetica, sans-serif !important;
32
+ }