File size: 1,711 Bytes
f5bbade
 
 
 
 
 
 
 
 
 
 
cd4c36b
 
 
 
 
 
 
50c28ba
cd4c36b
 
 
 
 
 
 
 
 
 
 
 
f5bbade
 
cd4c36b
 
 
 
 
 
 
834f605
 
cd4c36b
64371ee
cd4c36b
64371ee
f5bbade
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import streamlit as st


# Page configuration
st.set_page_config(
    page_title="Wren AI Cloud API Demo",
    page_icon="πŸ“Š",
    layout="wide",
)

st.title("πŸ“Š Wren AI Cloud API Demo")

if "api_key" not in st.session_state:
    st.session_state.api_key = ""
if "project_id" not in st.session_state:
    st.session_state.project_id = ""

with st.sidebar:
    st.header("πŸ”§ Configuration", help="We won't store your API key and project ID, so you can safely enter them here.")
    st.session_state.api_key = st.text_input(
        "API Key", 
        type="password", 
        placeholder="sk-your-api-key-here",
        help="Enter your Wren AI Cloud API key"
    )
    st.session_state.project_id = st.text_input(
        "Project ID", 
        placeholder="1234",
        help="Enter your Wren AI Cloud project ID"
    )

st.markdown(
"""
**Prerequisites:**

In order to successfully run the demo, you need to:
1. Create a Wren AI Cloud account: https://cloud.getwren.ai/
2. Create a project: https://docs.getwren.ai/cloud/getting_started/create_project
3. Connect to [your data source](https://docs.getwren.ai/cloud/guide/connect/overview) or [use our sample dataset](https://docs.getwren.ai/cloud/getting_started/sample_data/ecommerce)
4. Get your API key: https://docs.getwren.ai/cloud/guide/api-access/keys
5. Make sure you have enough API credits: https://docs.getwren.ai/cloud/guide/api-access/billing
6. Enter your API key and project ID in the sidebar.

**Resources:**

- Wren AI official website: https://getwren.ai/
- API Documentation: https://wrenai.readme.io/reference/cloud-getting-started
- Demo Source Code: https://huggingface.co/spaces/getWrenAI/wrenai-cloud-api-demo/tree/main
"""
)