File size: 853 Bytes
584509d |
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 |
---
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
|