|
--- |
|
license: openrail |
|
language: |
|
- en |
|
--- |
|
# Spark + Gradio Demo Space |
|
|
|
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. |
|
|
|
--- |
|
|
|
## Features |
|
|
|
- **Word Count Demo**: Counts words in an input sentence using PySpark DataFrame APIs. |
|
- **Spark Session**: Leverages a local `SparkSession` for fast, in-memory DataFrame operations. |
|
- **Gradio UI**: Simple, interactive interface for text input and results display. |
|
- **Extensible**: Swap out the `count_words` function for any Spark-powered ETL, ML pipeline, or DataFrame operation. |
|
|
|
--- |
|
|
|
## Files |
|
|
|
- `app.py` — Main Gradio application that initializes Spark, defines the demo function, and launches the UI. |
|
- `requirements.txt` — Python dependencies: |
|
```text |
|
gradio |
|
pyspark==3.3.2 |
|
|