Spaces:
Running
Running
add pages
Browse files- Dockerfile +1 -1
- Makefile +1 -1
- src/Home.py +19 -0
- src/{app.py β pages/1_Chart_Generation.py} +2 -11
Dockerfile
CHANGED
@@ -30,4 +30,4 @@ EXPOSE 8501
|
|
30 |
|
31 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
32 |
|
33 |
-
ENTRYPOINT ["streamlit", "run", "src/
|
|
|
30 |
|
31 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
32 |
|
33 |
+
ENTRYPOINT ["streamlit", "run", "src/Home.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
Makefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
run:
|
2 |
-
poetry run streamlit run src/
|
3 |
|
4 |
deps:
|
5 |
poetry export --without-hashes --without=dev --format=requirements.txt > requirements.txt
|
|
|
1 |
run:
|
2 |
+
poetry run streamlit run src/Home.py
|
3 |
|
4 |
deps:
|
5 |
poetry export --without-hashes --without=dev --format=requirements.txt > requirements.txt
|
src/Home.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
|
4 |
+
# Page configuration
|
5 |
+
st.set_page_config(
|
6 |
+
page_title="Wren AI Cloud API Demo",
|
7 |
+
page_icon="π",
|
8 |
+
layout="wide",
|
9 |
+
)
|
10 |
+
|
11 |
+
st.title("π Wren AI Cloud API Demo")
|
12 |
+
st.markdown(
|
13 |
+
"""
|
14 |
+
Please select a demo from the sidebar.
|
15 |
+
|
16 |
+
- API Documentation: https://wrenai.readme.io/reference/cloud-getting-started
|
17 |
+
- Demo Source Code: https://huggingface.co/spaces/getWrenAI/wrenai-cloud-api-demo/tree/main
|
18 |
+
"""
|
19 |
+
)
|
src/{app.py β pages/1_Chart_Generation.py}
RENAMED
@@ -3,17 +3,8 @@ import streamlit as st
|
|
3 |
from apis import generate_sql, generate_chart
|
4 |
|
5 |
|
6 |
-
# Page configuration
|
7 |
-
st.set_page_config(
|
8 |
-
page_title="Wren AI Cloud API Demo",
|
9 |
-
page_icon="π",
|
10 |
-
layout="wide"
|
11 |
-
)
|
12 |
-
|
13 |
-
|
14 |
def main():
|
15 |
-
st.title("π Wren AI Cloud API Demo")
|
16 |
-
st.markdown("Ask questions about your data and get both SQL queries and beautiful charts!")
|
17 |
|
18 |
# Sidebar for API configuration
|
19 |
with st.sidebar:
|
@@ -169,4 +160,4 @@ def main():
|
|
169 |
|
170 |
|
171 |
if __name__ == "__main__":
|
172 |
-
main()
|
|
|
3 |
from apis import generate_sql, generate_chart
|
4 |
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
def main():
|
7 |
+
st.title("π Wren AI Cloud API Demo - Chart Generation")
|
|
|
8 |
|
9 |
# Sidebar for API configuration
|
10 |
with st.sidebar:
|
|
|
160 |
|
161 |
|
162 |
if __name__ == "__main__":
|
163 |
+
main()
|