Spaces:
Runtime error
Runtime error
Commit ·
97b93a8
1
Parent(s): a6cefc9
init
Browse files- app.py +11 -0
- requirements.txt +5 -0
app.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
from datasets import load_dataset
|
| 3 |
+
|
| 4 |
+
# Load the dataset from Huggingface
|
| 5 |
+
dataset = load_dataset('thankrandomness/spam-detection-sample')
|
| 6 |
+
|
| 7 |
+
# Convert to a pandas DataFrame
|
| 8 |
+
df = pd.DataFrame(dataset['train'])
|
| 9 |
+
|
| 10 |
+
# Display the first few rows of the dataframe to verify
|
| 11 |
+
print(df.head())
|
requirements.txt
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
datasets
|
| 3 |
+
torch
|
| 4 |
+
pandas
|
| 5 |
+
gradio
|