Skip to content

Commit 1618ae1

Browse files
authored
feat: streamlit app for ydata-synthetic (#236)
* feat: improve example streamlit app to serve as the package interface * chore: remove from the examples as now it is a feature * feat: add input path to save model and save synthetic data samples * docs: add new streamlit example and update readme * docs: update readme with a video * fix: udapte the setup file and readme * fix: fix typo * fix: remove comments * fix: codacy code quality issues
1 parent d43b5f3 commit 1618ae1

22 files changed

Lines changed: 387 additions & 168 deletions

File tree

README.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ Join us on [![Discord](https://img.shields.io/badge/Discord-7289DA?style=for-the
1111

1212
# YData Synthetic
1313
A package to generate synthetic tabular and time-series data leveraging the state of the art generative models.
14+
15+
## 🎊 We have **big news**: v1.0.0 is here
16+
> We have exciting news for you. The new version of `ydata-synthetic` include new and exciting features:
17+
> - A conditional architecture for tabular data: CTGAN, which will make the process of synthetic data generation easier and with higher quality!
18+
> - A new streamlit app that delivers the synthetic data generation experience with a UI interface
19+
1420
## Synthetic data
1521
### What is synthetic data?
1622
Synthetic data is artificially generated data that is not collected from real world events. It replicates the statistical components of real data without containing any identifiable information, ensuring individuals' privacy.
@@ -27,19 +33,54 @@ This repository contains material related with Generative Adversarial Networks f
2733
It consists a set of different GANs architectures developed using Tensorflow 2.0. Several example Jupyter Notebooks and Python scripts are included, to show how to use the different architectures.
2834

2935
## Quickstart
30-
3136
The source code is currently hosted on GitHub at: https://github.com/ydataai/ydata-synthetic
3237

3338
Binary installers for the latest released version are available at the [Python Package Index (PyPI).](https://pypi.org/project/ydata-synthetic/)
34-
```
39+
```commandline
3540
pip install ydata-synthetic
3641
```
3742

43+
### The UI guide for synthetic data generation
44+
45+
YData synthetic has now a UI interface to guide you through the steps and inputs to generate structure tabular data.
46+
The streamlit app is available form *v1.0.0* onwards, and supports the following flows:
47+
- Train a synthesizer model
48+
- Generate & profile synthetic data samples
49+
50+
#### Installation
51+
52+
```commandline
53+
pip install ydata-syntehtic[streamlit]
54+
```
55+
#### Quickstart
56+
Use the code snippet below in a python file (Jupyter Notebooks are not supported):
57+
```python
58+
from ydata_synthetic import streamlit_app
59+
60+
streamlit_app.run()
61+
```
62+
63+
Or use the file streamlit_app.py that can be found in the [examples folder](https://github.com/ydataai/ydata-synthetic/tree/master/examples/streamlit_app.py).
64+
65+
```commandline
66+
python -m streamlit_app
67+
```
68+
69+
The below models are supported:
70+
- CGAN
71+
- WGAN
72+
- WGANGP
73+
- DRAGAN
74+
- CRAMER
75+
- CTGAN
76+
77+
[![Watch the video](assets/streamlit_app.png)](https://youtu.be/ep0PhwsFx0A)
78+
3879
### Examples
3980
Here you can find usage examples of the package and models to synthesize tabular data.
4081
- Synthesizing the minority class with VanillaGAN on credit fraud dataset [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ydataai/ydata-synthetic/blob/master/examples/regular/gan_example.ipynb)
4182
- Time Series synthetic data generation with TimeGAN on stock dataset [![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ydataai/ydata-synthetic/blob/master/examples/timeseries/TimeGAN_Synthetic_stock_data.ipynb)
42-
- More examples are continously added and can be found in `/examples` directory.
83+
- More examples are continuously added and can be found in `/examples` directory.
4384

4485
### Datasets for you to experiment
4586
Here are some example datasets for you to try with the synthesizers:
@@ -51,7 +92,6 @@ Here are some example datasets for you to try with the synthesizers:
5192
#### Sequential datasets
5293
- [Stock data](https://github.com/ydataai/ydata-synthetic/tree/master/data)
5394

54-
5595
## Project Resources
5696

5797
In this repository you can find the several GAN architectures that are used to create synthesizers:
@@ -64,6 +104,7 @@ In this repository you can find the several GAN architectures that are used to c
64104
- [DRAGAN (On Convergence and stability of GANS)](https://arxiv.org/pdf/1705.07215.pdf)
65105
- [Cramer GAN (The Cramer Distance as a Solution to Biased Wasserstein Gradients)](https://arxiv.org/abs/1705.10743)
66106
- [CWGAN-GP (Conditional Wassertein GAN with Gradient Penalty)](https://cameronfabbri.github.io/papers/conditionalWGAN.pdf)
107+
- [CTGAN (Conditional Tabular GAN)](https://arxiv.org/pdf/1907.00503.pdf)
67108

68109
### Sequential data
69110
- [TimeGAN](https://papers.nips.cc/paper/2019/file/c9efe5f26cd17ba6216bbe2a7d26d490-Paper.pdf)

assets/streamlit_app.png

102 KB
Loading

examples/regular/streamlit app/.streamlit/config.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/regular/streamlit app/README.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/regular/streamlit app/YData_logo.svg

Lines changed: 0 additions & 15 deletions
This file was deleted.
-108 KB
Binary file not shown.
-8.38 MB
Binary file not shown.

examples/regular/streamlit app/app.py

Lines changed: 0 additions & 113 deletions
This file was deleted.

examples/regular/streamlit app/requirements.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

examples/streamlit_app.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"""
2+
Python file example with the script to run ydata-synthetic streamlit app
3+
"""
4+
from ydata_synthetic import streamlit_app
5+
6+
if __name__ == '__main__':
7+
streamlit_app.run()

0 commit comments

Comments
 (0)