crystalai archiesarrewood commited on
Commit
a0c0905
0 Parent(s):

Duplicate from evidence-dev/template-app

Browse files

Co-authored-by: Archie <archiesarrewood@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ sources/needful_things/needful_things.duckdb filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:20
2
+
3
+ # Install http-server to serve the static site
4
+ RUN npm install -g http-server
5
+
6
+ # Build the app
7
+ WORKDIR /usr/app
8
+ COPY ./ /usr/app
9
+ RUN npm install
10
+ RUN npm run sources && npm run build
11
+
12
+ # Expose port 7860
13
+ EXPOSE 7860
14
+
15
+ # Serve the static site from the /usr/app/build directory on host 0.0.0.0 and port 7860
16
+ CMD ["http-server", "/usr/app/build", "-a", "0.0.0.0", "-p", "7860"]
README.md ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Evidence Template
3
+ emoji: 📦
4
+ colorFrom: blue
5
+ colorTo: green
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
+
11
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
evidence.plugins.yaml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ components:
3
+ # This loads all of evidence's core charts and UI components
4
+ # You probably don't want to edit this dependency unless you know what you are doing
5
+ "@evidence-dev/core-components": {}
6
+
7
+ datasources:
8
+ # You can add additional datasources here by adding npm packages.
9
+ # Make to also add them to `package.json`.
10
+ "@evidence-dev/bigquery": { }
11
+ "@evidence-dev/csv": { }
12
+ "@evidence-dev/databricks": { }
13
+ "@evidence-dev/duckdb": { }
14
+ "@evidence-dev/mssql": { }
15
+ "@evidence-dev/mysql": { }
16
+ "@evidence-dev/postgres": { }
17
+ "@evidence-dev/snowflake": { }
18
+ "@evidence-dev/sqlite": { }
19
+ "@evidence-dev/trino": { }
20
+ "@evidence-dev/motherduck": { }
package-lock.json ADDED
The diff for this file is too large to render. See raw diff
 
package.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "my-evidence-project",
3
+ "version": "0.0.1",
4
+ "scripts": {
5
+ "build": "evidence build",
6
+ "build:strict": "evidence build:strict",
7
+ "dev": "evidence dev --open /",
8
+ "test": "evidence build",
9
+ "sources": "evidence sources",
10
+ "preview": "evidence preview"
11
+ },
12
+ "engines": {
13
+ "npm": ">=7.0.0",
14
+ "node": ">=18.0.0"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@evidence-dev/bigquery": "^2.0.7",
19
+ "@evidence-dev/core-components": "^4.8.10",
20
+ "@evidence-dev/csv": "^1.0.12",
21
+ "@evidence-dev/databricks": "^1.0.7",
22
+ "@evidence-dev/duckdb": "^1.0.11",
23
+ "@evidence-dev/evidence": "^39.1.13",
24
+ "@evidence-dev/motherduck": "^1.0.2",
25
+ "@evidence-dev/mssql": "^1.0.9",
26
+ "@evidence-dev/mysql": "^1.1.3",
27
+ "@evidence-dev/postgres": "^1.0.6",
28
+ "@evidence-dev/snowflake": "^1.1.0",
29
+ "@evidence-dev/sqlite": "^2.0.6",
30
+ "@evidence-dev/trino": "^1.0.8"
31
+ },
32
+ "overrides": {
33
+ "jsonwebtoken": "9.0.0",
34
+ "trim@<0.0.3": ">0.0.3",
35
+ "sqlite3": "5.1.5"
36
+ }
37
+ }
pages/index.md ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Welcome to Evidence's Hugging Face Demo
3
+ ---
4
+
5
+ The source code for this project can be found in this <a href=https://huggingface.co/spaces/evidence-dev/template-app/tree/main class=markdown target="_blank">Hugging Face Space</a>.
6
+
7
+ <Details title='How to edit this page'>
8
+
9
+ This page can be found in your project at `/pages/index.md`. Make a change to the markdown file and save it to see the change take effect in your browser.
10
+ </Details>
11
+
12
+ ```sql categories
13
+ select
14
+ category
15
+ from needful_things.orders
16
+ group by category
17
+ ```
18
+
19
+ <Dropdown data={categories} name=category value=category>
20
+ <DropdownOption value="%" valueLabel="All Categories"/>
21
+ </Dropdown>
22
+
23
+ <Dropdown name=year>
24
+ <DropdownOption value=% valueLabel="All Years"/>
25
+ <DropdownOption value=2019/>
26
+ <DropdownOption value=2020/>
27
+ <DropdownOption value=2021/>
28
+ </Dropdown>
29
+
30
+ ```sql orders_by_category
31
+ select
32
+ date_trunc('month', order_datetime) as month,
33
+ sum(sales) as sales_usd,
34
+ category
35
+ from needful_things.orders
36
+ where category like '${inputs.category.value}'
37
+ and date_part('year', order_datetime) like '${inputs.year.value}'
38
+ group by all
39
+ order by sales_usd desc
40
+ ```
41
+
42
+ <BarChart
43
+ data={orders_by_category}
44
+ title="Sales by Month, {inputs.category.label}"
45
+ x=month
46
+ y=sales_usd
47
+ series=category
48
+ />
49
+
50
+
51
+ ## Learn More
52
+
53
+ - Read the [Docs](https://docs.evidence.dev/)
54
+ - Get support on <a href=https://slack.evidence.dev/ class=markdown target="_blank">Slack</a>
55
+ - Open issues on <a href=https://github.com/evidence-dev/evidence class=markdown target="_blank">GitHub</a>
sources/needful_things/connection.yaml ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ # This file was automatically generated
2
+ name: needful_things
3
+ type: duckdb
4
+ options:
5
+ filename: needful_things.duckdb
sources/needful_things/needful_things.duckdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7b039bbf18e5d003cf66f1397f76c8bde0384336039d25c3944cf84735b5c3d
3
+ size 1323008
sources/needful_things/orders.sql ADDED
@@ -0,0 +1 @@
 
 
1
+ select * from orders