File size: 1,388 Bytes
2dcbc14
979a745
2dcbc14
 
 
 
32a09b1
2dcbc14
 
979a745
500d90f
2dcbc14
 
3e8eddf
2dcbc14
4a10703
2dcbc14
 
 
 
27605d4
 
2dcbc14
 
 
 
 
fee1bf4
2dcbc14
 
 
 
68c9ed6
 
2dcbc14
27605d4
 
 
 
 
 
 
 
 
 
 
 
4a10703
 
27605d4
 
 
68c9ed6
2dcbc14
68c9ed6
2dcbc14
 
4a10703
4419217
4a10703
2dcbc14
 
4a10703
27605d4
 
 
68c9ed6
2dcbc14
68c9ed6
5e6e795
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: Sentiment Analysis On Encrypted Data Using Fully Homomorphic Encryption And EZKL
emoji: 🥷💬
colorFrom: yellow
colorTo: yellow
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: true
tags: [FHE, EZKL, PPML, privacy, privacy preserving machine learning, homomorphic encryption, security]
python_version: 3.10.11
---

# Sentiment Analysis With FHE And EZKL

## Launch locally

- First, create a virtual env and activate it:

```bash
conda create --name sentiment_analysis_demo python=3.10.11
conda activate sentiment_analysis_demo
```

- Then, install required packages:

```bash
pip3 install pip --upgrade
pip3 install -U pip wheel setuptools --ignore-installed
pip3 install -r requirements.txt --ignore-installed
```

Check it finish well (with a "Done!"). Please note that the actual model initialization and training 
can be found in the [SentimentClassification notebook](SentimentClassification.ipynb) (see below).

## Compile the FHE algorithm

### Download data

```shell
pip3 install kaggle
./0_download_data.sh
```

### Compile

```bash
cd 1_build
python3 main.py
```


### Launch the app locally

- In a terminal:

```bash
cd 2_run
cp ../config.py.example config.py
python3 app.py
```

## Launch docker

TODO

## Interact with the application

Open the given URL link (search for a line like `Running on local URL:  http://127.0.0.1:8888/` in the 
terminal).