I have a Streamlit app on Hugging Face, and I want to save users’ feedback, preferences, and data in a data storage or database. Is it possible on Hugging Face, and how can I do it?
I recommend creating a private data set repo and reading and writing from it. If you don’t need to make it private, it’s even easier.
Hi @ADalsrehy
If you want to save your data into a huggingface dataset instead you can use a commit scheduler.
These are some methods proposed by wauplin to push your data (I have hot patched his space in here Space to Dataset Saver - a Hugging Face Space by not-lain )
save as json
import json
from datetime import datetime
from pathlib import Path
from uuid import uuid4
import gradio as gr
from huggingface_hub import CommitScheduler
JSON_DATASET_DIR = Path("json_dataset")
JSON_DATASET_DIR…
from where can I create a private data set repo? Is it from Create a new dataset repository?
I will try it. Thanks a lot!