raoufjat commited on
Commit
428c884
·
verified ·
1 Parent(s): 292a188

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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