Spaces:
Sleeping
Sleeping
alexandre-huynh
commited on
Update modeles.py
Browse files- modeles.py +8 -0
modeles.py
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from transformers import pipeline
|
2 |
|
3 |
def bert(context, question):
|
|
|
1 |
+
import subprocess
|
2 |
+
import sys
|
3 |
+
|
4 |
+
def install(package):
|
5 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
|
6 |
+
|
7 |
+
install("transformers")
|
8 |
+
|
9 |
from transformers import pipeline
|
10 |
|
11 |
def bert(context, question):
|