Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
|
@@ -7,14 +7,6 @@ import requests
|
|
| 7 |
|
| 8 |
st.set_page_config(page_title="Miragic Sales Pilot", page_icon="π")
|
| 9 |
|
| 10 |
-
# Display logo and title in a horizontal layout
|
| 11 |
-
col1, col2 = st.columns([1, 4])
|
| 12 |
-
with col1:
|
| 13 |
-
st.image("logo.png", width=100) # Adjust width as needed
|
| 14 |
-
with col2:
|
| 15 |
-
st.title("Miragic Sales Pilot")
|
| 16 |
-
|
| 17 |
-
|
| 18 |
sales_file = None
|
| 19 |
# st.write("Enter comma-separated numbers (e.g. `10, 20, 30`) to generate a bar chart.")
|
| 20 |
|
|
@@ -34,24 +26,40 @@ def analyze_sales_data(sales_file: str, prompt: str):
|
|
| 34 |
|
| 35 |
# Sidebar Menu
|
| 36 |
with st.sidebar:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
# TODO Name for product
|
| 38 |
# st.title("π Miragic Sales Pilot")
|
| 39 |
# st.subheader("Intelligent sales assistant")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
st.markdown("""
|
| 41 |
### π Instructions
|
| 42 |
-
1. **Upload your data**: Use the file uploader below to upload your sales data
|
| 43 |
-
2. **
|
| 44 |
-
- A 'Date' column
|
| 45 |
-
- A 'Sales' column
|
| 46 |
-
3. **Sample file**: Download our sample CSV below to see the expected format
|
| 47 |
|
| 48 |
### π What this app does
|
| 49 |
- Analyzes your sales data
|
| 50 |
- Generates visualizations
|
| 51 |
- Provides intelligent insights
|
| 52 |
|
| 53 |
-
###
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
""")
|
| 56 |
uploaded_file = st.file_uploader("", type=["csv", "excel"])
|
| 57 |
if uploaded_file is not None:
|
|
@@ -90,13 +98,6 @@ with st.expander("About the Sales Pilot"):
|
|
| 90 |
st.markdown("""
|
| 91 |
The Sales Pilot is a sales assistant that can analyze and forecast sales using your historical excel or csv data.
|
| 92 |
It can help you understand your sales data and make predictions about future sales.
|
| 93 |
-
|
| 94 |
-
### π€ Join our Community
|
| 95 |
-
- Discord: [Join our Discord server](https://discord.com/invite/7wmy5H2dwh)
|
| 96 |
-
- YouTube: [Subscribe to our channel](https://www.youtube.com/channel/UCltuweJjWc3A25ub8X6q5oA)
|
| 97 |
-
|
| 98 |
-
### π’ Company
|
| 99 |
-
Sales Pilot is developed by [Miragic AI](https://miragic.ai), a company focused on bringing Generative AI Solutions.
|
| 100 |
""")
|
| 101 |
|
| 102 |
|
|
|
|
| 7 |
|
| 8 |
st.set_page_config(page_title="Miragic Sales Pilot", page_icon="π")
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
sales_file = None
|
| 11 |
# st.write("Enter comma-separated numbers (e.g. `10, 20, 30`) to generate a bar chart.")
|
| 12 |
|
|
|
|
| 26 |
|
| 27 |
# Sidebar Menu
|
| 28 |
with st.sidebar:
|
| 29 |
+
st.markdown("""
|
| 30 |
+
<style>
|
| 31 |
+
[data-testid="stSidebar"][aria-expanded="true"]{
|
| 32 |
+
min-width: 450px;
|
| 33 |
+
max-width: 450px;
|
| 34 |
+
}
|
| 35 |
+
</style>
|
| 36 |
+
""", unsafe_allow_html=True)
|
| 37 |
# TODO Name for product
|
| 38 |
# st.title("π Miragic Sales Pilot")
|
| 39 |
# st.subheader("Intelligent sales assistant")
|
| 40 |
+
# Display logo and title in a horizontal layout
|
| 41 |
+
col1, col2 = st.columns([1, 4])
|
| 42 |
+
with col1:
|
| 43 |
+
st.image("logo.png", width=100) # Adjust width as needed
|
| 44 |
+
with col2:
|
| 45 |
+
st.title("Miragic Sales Pilot")
|
| 46 |
+
|
| 47 |
st.markdown("""
|
| 48 |
### π Instructions
|
| 49 |
+
1. **Upload your data**: Use the file uploader below to upload your sales excel or csv data
|
| 50 |
+
2. **Chat with your data**: Ask me anything about your sales data
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
### π What this app does
|
| 53 |
- Analyzes your sales data
|
| 54 |
- Generates visualizations
|
| 55 |
- Provides intelligent insights
|
| 56 |
|
| 57 |
+
### π€ Join our Community
|
| 58 |
+
- Discord: [Join our Discord server](https://discord.com/invite/7wmy5H2dwh)
|
| 59 |
+
- YouTube: [Subscribe to our channel](https://www.youtube.com/channel/UCltuweJjWc3A25ub8X6q5oA)
|
| 60 |
+
|
| 61 |
+
### π’ Company
|
| 62 |
+
Sales Pilot is developed by [Miragic AI](https://miragic.ai), a company focused on bringing Generative AI Solutions.
|
| 63 |
""")
|
| 64 |
uploaded_file = st.file_uploader("", type=["csv", "excel"])
|
| 65 |
if uploaded_file is not None:
|
|
|
|
| 98 |
st.markdown("""
|
| 99 |
The Sales Pilot is a sales assistant that can analyze and forecast sales using your historical excel or csv data.
|
| 100 |
It can help you understand your sales data and make predictions about future sales.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
""")
|
| 102 |
|
| 103 |
|