db uri
This commit is contained in:
parent
b666783b35
commit
d5419dffc9
@ -16,10 +16,8 @@ if __name__ == '__main__':
|
||||
try:
|
||||
with open(os.path.join('dataset', 'final_id_v2.jsonl'), encoding='utf-8') as file:
|
||||
data = [json.loads(line) for line in file]
|
||||
db.session.add(Samples(data['text']))
|
||||
|
||||
|
||||
for sample in data:
|
||||
db.session.add(Samples(sample['text']))
|
||||
db.session.commit()
|
||||
print('Data sucessfully inserted')
|
||||
except FileNotFoundError as err:
|
||||
|
@ -11,3 +11,4 @@ SQLAlchemy==2.0.28
|
||||
typing_extensions==4.10.0
|
||||
Werkzeug==3.0.1
|
||||
zipp==3.18.1
|
||||
psycopg2-binary
|
||||
|
Loading…
Reference in New Issue
Block a user