Spaces:
Runtime error
Runtime error
Commit
·
1a505ec
1
Parent(s):
5893957
Update app.py
Browse files
app.py
CHANGED
@@ -2,13 +2,6 @@ import gradio as gr
|
|
2 |
import pickle
|
3 |
import sys
|
4 |
import subprocess
|
5 |
-
import pandas as pd
|
6 |
-
from sklearn.utils import shuffle
|
7 |
-
from sklearn.feature_extraction.text import TfidfVectorizer
|
8 |
-
from xgboost import XGBClassifier
|
9 |
-
from sklearn.model_selection import train_test_split
|
10 |
-
import pymystem3
|
11 |
-
from tqdm import tqdm
|
12 |
|
13 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
|
14 |
'xgboost'])
|
@@ -19,6 +12,14 @@ subprocess.check_call([sys.executable, '-m', 'pip', 'install',
|
|
19 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
|
20 |
'pandas'])
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Load the model from the file
|
23 |
with open('xgb_model.pkl', 'rb') as file:
|
24 |
model = pickle.load(file)
|
|
|
2 |
import pickle
|
3 |
import sys
|
4 |
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
|
7 |
'xgboost'])
|
|
|
12 |
subprocess.check_call([sys.executable, '-m', 'pip', 'install',
|
13 |
'pandas'])
|
14 |
|
15 |
+
import pandas as pd
|
16 |
+
from sklearn.utils import shuffle
|
17 |
+
from sklearn.feature_extraction.text import TfidfVectorizer
|
18 |
+
from xgboost import XGBClassifier
|
19 |
+
from sklearn.model_selection import train_test_split
|
20 |
+
import pymystem3
|
21 |
+
from tqdm import tqdm
|
22 |
+
|
23 |
# Load the model from the file
|
24 |
with open('xgb_model.pkl', 'rb') as file:
|
25 |
model = pickle.load(file)
|