davidgasquez commited on
Commit
f0b559b
·
verified ·
1 Parent(s): 526918b

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. Dockerfile +7 -0
  2. README.md +9 -0
  3. roapi.yml +12 -0
Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.12
2
+
3
+ COPY roapi.yml /app/roapi.yml
4
+
5
+ RUN pip install --no-cache-dir roapi
6
+
7
+ CMD ["roapi", "-c", "/app/roapi.yml"]
README.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # API
2
+
3
+ This folder contains a simple API built with [RoAPI](https://github.com/roapi/roapi) to serve the datasets that are available in the [Datonic's Hugging Face Organization](https://huggingface.co/datonic).
4
+
5
+ To upload the datasets to the Hugging Face Space, you can use the following command:
6
+
7
+ ```bash
8
+ uv run huggingface-cli upload --token=$HUGGINGFACE_TOKEN datonic/api --repo-type=space --delete "*" ./api .
9
+ ```
roapi.yml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ addr:
2
+ http: 0.0.0.0:8084
3
+ postgres: 0.0.0.0:5432
4
+ tables:
5
+ - name: "owid_indicators"
6
+ uri: "https://huggingface.co/datasets/datonic/owid_indicators/resolve/main/data/owid_indicators.parquet"
7
+ option:
8
+ format: "parquet"
9
+ - name: "world_development_indicators"
10
+ uri: "https://huggingface.co/datasets/datonic/world_development_indicators/resolve/main/data/world_development_indicators.parquet"
11
+ option:
12
+ format: "parquet"