Mhassanen commited on
Commit
7ad9d3c
·
verified ·
1 Parent(s): 692548a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -13,10 +13,21 @@ st.set_page_config(page_title="SQL Agent with Streamlit", page_icon=":bar_chart:
13
 
14
  # Sidebar Information
15
  with st.sidebar:
 
 
 
 
 
 
 
 
 
 
16
  st.write("## About Me")
17
  st.write("**Mahmoud Hassanen**")
18
  st.write("**[LinkedIn Profile](https://www.linkedin.com/in/mahmoudhassanen99/)**")
19
 
 
20
  # Main Page
21
  st.title("SQL Agent with Streamlit")
22
  st.header("Analyze Sales Data with Natural Language Queries")
@@ -116,13 +127,6 @@ if "generated_sql" in st.session_state:
116
  else:
117
  st.warning("No suitable chart found for this data.")
118
 
119
- # Static Seaborn Visualization (Optional)
120
- if 'region' in result_df.columns and 'total_sales' in result_df.columns:
121
- st.write("### Total Sales by Region")
122
- fig, ax = plt.subplots()
123
- sns.barplot(x='region', y='total_sales', data=result_df, ax=ax)
124
- st.pyplot(fig)
125
-
126
  else:
127
  st.error(f"Error executing SQL: {response.json().get('error')}")
128
  except Exception as e:
 
13
 
14
  # Sidebar Information
15
  with st.sidebar:
16
+ st.write(""" # SQL Agent with Streamlit
17
+ This web app allows you to interact with your data warehouse (DWH) using natural language queries.
18
+ Simply enter a question, and the app will generate and execute the corresponding SQL query.
19
+ You can also modify the generated SQL before execution, making it easy to analyze your sales data and view visualizations.
20
+ Hosted using Streamlit and integrated with Azure SQL Database and OpenAI's GPT-3.5 model, this tool bridges the gap between data analysis and natural language understanding.""")
21
+ st.write("""This web app allows you to interact with your data warehouse (DWH) using natural language queries.
22
+ Simply enter a question, and the app will generate and execute the corresponding SQL query.
23
+ You can also modify the generated SQL before execution, making it easy to analyze your sales data and view visualizations.
24
+ Hosted using Streamlit and integrated with Azure SQL Database and OpenAI's GPT-3.5 model, this tool bridges the gap between data analysis and natural language understanding.""")
25
+
26
  st.write("## About Me")
27
  st.write("**Mahmoud Hassanen**")
28
  st.write("**[LinkedIn Profile](https://www.linkedin.com/in/mahmoudhassanen99/)**")
29
 
30
+
31
  # Main Page
32
  st.title("SQL Agent with Streamlit")
33
  st.header("Analyze Sales Data with Natural Language Queries")
 
127
  else:
128
  st.warning("No suitable chart found for this data.")
129
 
 
 
 
 
 
 
 
130
  else:
131
  st.error(f"Error executing SQL: {response.json().get('error')}")
132
  except Exception as e: