Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,10 @@ from datasets import load_dataset
|
|
5 |
|
6 |
# Load the dataset
|
7 |
dataset = load_dataset("MohamedRashad/arabic-books")
|
|
|
|
|
|
|
|
|
8 |
|
9 |
|
10 |
# Function to display the first row text
|
|
|
5 |
|
6 |
# Load the dataset
|
7 |
dataset = load_dataset("MohamedRashad/arabic-books")
|
8 |
+
def filter_arabic_novels():
|
9 |
+
# Select only rows containing novel-like words
|
10 |
+
filtered_data = dataset['train'].filter(lambda x: "رواية" in x['text'])
|
11 |
+
return filtered_data
|
12 |
|
13 |
|
14 |
# Function to display the first row text
|