Experiment with framework
Signed-off-by: András Schmelczer <andras@schmelczer.dev>
This commit is contained in:
parent
ea54cd9c8c
commit
cef2e51c67
25 changed files with 442 additions and 251 deletions
16
example/main.py
Normal file
16
example/main.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import json
|
||||
|
||||
from open_s3 import LargeFile
|
||||
from predict import predict_domain
|
||||
|
||||
from good_ai import process_batch
|
||||
|
||||
if __name__ == "__main__":
|
||||
with open("data/s2-corpus-1583.json") as f:
|
||||
raw = json.load(f)
|
||||
|
||||
LargeFile.configure_credentials_from_file("s3.ini")
|
||||
|
||||
data = {f'{r["title"]} {r["abstract"]}': r["domain"] for r in raw[:5]}
|
||||
|
||||
print(process_batch(predict_domain, ["We have found a new type of chemical."]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue