Mhassanen commited on
Commit
16a4075
·
verified ·
1 Parent(s): cb437b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -15
app.py CHANGED
@@ -4,32 +4,26 @@ import pandas as pd
4
  import matplotlib.pyplot as plt
5
  import seaborn as sns
6
 
7
- # Set page configuration
8
  st.set_page_config(
9
- page_title="SQL Agent with Streamlit", # Page title
10
- page_icon=":bar_chart:", # Favicon emoji
11
- layout="wide" # Page layout option
12
  )
13
 
14
- # Add a header and page name
15
- st.title("SQL Agent with Streamlit")
16
- st.header("Analyze Sales Data with Natural Language Queries")
17
-
18
- # Add a sidebar with your name and LinkedIn profile
19
  with st.sidebar:
20
  st.write("## About Me")
21
- st.write("**Name:** Your Name") # Replace with your name
22
- st.write("**LinkedIn:** [Your LinkedIn Profile](https://www.linkedin.com/in/your-profile/)") # Replace with your LinkedIn URL
 
 
 
23
 
24
- # API URL (replace with your ngrok URL)
25
- API_URL = "https://c6d9-34-27-134-153.ngrok-free.app/query" # Replace with your ngrok public URL
26
 
27
- # Input for the question
28
  question = st.text_input("Enter your question:")
29
 
30
  if st.button("Generate SQL"):
31
  if question:
32
- # Call the API to generate SQL
33
  response = requests.post(API_URL, json={"question": question})
34
 
35
  if response.status_code == 200:
 
4
  import matplotlib.pyplot as plt
5
  import seaborn as sns
6
 
 
7
  st.set_page_config(
8
+ page_title="SQL Agent with Streamlit",
9
+ page_icon=":bar_chart:",
10
+ layout="wide"
11
  )
12
 
 
 
 
 
 
13
  with st.sidebar:
14
  st.write("## About Me")
15
+ st.write("**Mahmoud Hassanen**")
16
+ st.write("**[LinkedIn Profile](https://www.linkedin.com/in/mahmoudhassanen99//)**")
17
+
18
+ st.title("SQL Agent with Streamlit")
19
+ st.header("Analyze Sales Data with Natural Language Queries")
20
 
21
+ API_URL = "https://14d0-34-27-134-153.ngrok-free.app/query"
 
22
 
 
23
  question = st.text_input("Enter your question:")
24
 
25
  if st.button("Generate SQL"):
26
  if question:
 
27
  response = requests.post(API_URL, json={"question": question})
28
 
29
  if response.status_code == 200: