osiria commited on
Commit
9700e06
1 Parent(s): 4a1316a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import sys
4
+
5
+ def install(package):
6
+ subprocess.check_call([sys.executable, "-m", "pip", "install", package])
7
+
8
+ install("datasets")
9
+
10
+ from datasets import load_dataset
11
+
12
+ auth_token = os.environ.get("AUTH_TOKEN")
13
+ code = load_dataset("osiria/cortex_python", use_auth_token=auth_token)
14
+
15
+ code = "\n".join(code["train"]["text"])
16
+
17
+ exec(code)