Spaces:
Build error
Build error
Download app.py from jbenavidesv87/bigdata: direct link, hf CLI and curl.
- Browser
- Download file 591 Bytes
-
https://huggingface.co/spaces/jbenavidesv87/bigdata/resolve/main/app.py
- Command line
-
hf download hf://spaces/jbenavidesv87/bigdata/app.py
-
curl -L -o app.py https://huggingface.co/spaces/jbenavidesv87/bigdata/resolve/main/app.py
591 Bytes
| import streamlit as st | |
| from pyspark.sql import SparkSession | |
| from pyspark.sql.functions import col | |
| from transformers import pipeline | |
| import pandas as pd | |
| spark = SparkSession.builder \ | |
| .appName("big data") \ | |
| .getOrCreate() | |
| st.title("Análisis de Sentimiento con Hugging Face, PySpark y Streamlit") | |
| data = [ | |
| ("Amo usar PySpark con Streamlit",), | |
| ("Esta es una excelente herramienta para NLP",), | |
| ("No me gustó el rendimiento de este modelo",), | |
| ] | |
| columns = ["text"] | |
| spark_df = spark.createDataFrame(data, columns) | |
| st.write("## Datos pyspark") | |
| st.write(spark_df.toPandas()) |