Create app.py
Browse files
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)
|