Spaces:
Runtime error
Runtime error
Update README
Browse files
README.md
CHANGED
|
@@ -1,37 +1,42 @@
|
|
| 1 |
---
|
| 2 |
title: Perplexity Lenses
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Perplexity Lenses
|
| 3 |
+
emoji: 🌸
|
| 4 |
+
colorFrom: pink
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: streamlit
|
| 7 |
app_file: app.py
|
| 8 |
pinned: false
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# Installation:
|
| 12 |
+
Requires Python >= 3.7 and < 3.10
|
| 13 |
+
```
|
| 14 |
+
pip install -r requirements.txt
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
# Web App:
|
| 18 |
+
The app is hosted [here](https://huggingface.co/spaces/edugp/perplexity-lenses). To run it locally:
|
| 19 |
+
```
|
| 20 |
+
python -m streamlit run app.py
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
# CLI
|
| 24 |
+
The CLI with no arguments defaults to running mc4 in Spanish.
|
| 25 |
+
For full usage:
|
| 26 |
+
```
|
| 27 |
+
python cli.py --help
|
| 28 |
+
```
|
| 29 |
+
Example: Running on 1000 sentences extracted from Spanish OSCAR docs specifying all arguments:
|
| 30 |
+
```
|
| 31 |
+
python cli.py \
|
| 32 |
+
--dataset oscar \
|
| 33 |
+
--dataset-config unshuffled_deduplicated_es \
|
| 34 |
+
--dataset-split train \
|
| 35 |
+
--text-column text \
|
| 36 |
+
--language es \
|
| 37 |
+
--doc-type sentence \
|
| 38 |
+
--sample 1000 \
|
| 39 |
+
--dimensionality-reduction umap \
|
| 40 |
+
--model-name distiluse-base-multilingual-cased-v1 \
|
| 41 |
+
--output-file perplexity.html
|
| 42 |
+
```
|