Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: openrail
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: openrail
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
---
|
| 6 |
+
# Spark + Gradio Demo Space
|
| 7 |
+
|
| 8 |
+
This Hugging Face Space demonstrates running a local PySpark session inside a Gradio web app. Users can enter text or upload data, and Spark will process it on the fly.
|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
## Features
|
| 13 |
+
|
| 14 |
+
- **Word Count Demo**: Counts words in an input sentence using PySpark DataFrame APIs.
|
| 15 |
+
- **Spark Session**: Leverages a local `SparkSession` for fast, in-memory DataFrame operations.
|
| 16 |
+
- **Gradio UI**: Simple, interactive interface for text input and results display.
|
| 17 |
+
- **Extensible**: Swap out the `count_words` function for any Spark-powered ETL, ML pipeline, or DataFrame operation.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## Files
|
| 22 |
+
|
| 23 |
+
- `app.py` — Main Gradio application that initializes Spark, defines the demo function, and launches the UI.
|
| 24 |
+
- `requirements.txt` — Python dependencies:
|
| 25 |
+
```text
|
| 26 |
+
gradio
|
| 27 |
+
pyspark==3.3.2
|