Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -4,13 +4,15 @@ import os
|
|
4 |
from datasets import load_dataset
|
5 |
|
6 |
|
7 |
-
def update_db_hub(texts):
|
8 |
api_token = os.getenv("hf_key")
|
9 |
login(token=api_token)
|
10 |
dataset_name = "Danielrahmai1991/row_data"
|
11 |
|
12 |
new_rows = {
|
13 |
'text': texts,
|
|
|
|
|
14 |
}
|
15 |
new_dataset = Dataset.from_dict(new_rows)
|
16 |
|
|
|
4 |
from datasets import load_dataset
|
5 |
|
6 |
|
7 |
+
def update_db_hub(texts, topics, dates):
|
8 |
api_token = os.getenv("hf_key")
|
9 |
login(token=api_token)
|
10 |
dataset_name = "Danielrahmai1991/row_data"
|
11 |
|
12 |
new_rows = {
|
13 |
'text': texts,
|
14 |
+
"topic": topics,
|
15 |
+
"date": dates
|
16 |
}
|
17 |
new_dataset = Dataset.from_dict(new_rows)
|
18 |
|