Spaces:
Runtime error
Runtime error
kernelmachine
commited on
Commit
•
4e4a3d8
1
Parent(s):
2c5347a
update
Browse files- app.py +1 -16
- requirements.txt +3 -1
app.py
CHANGED
@@ -1,26 +1,11 @@
|
|
1 |
import gradio as gr
|
2 |
-
import argparse
|
3 |
-
import json
|
4 |
-
import logging
|
5 |
import os
|
6 |
-
import
|
7 |
-
import pathlib
|
8 |
-
import random
|
9 |
-
import shutil
|
10 |
-
import time
|
11 |
-
from typing import Any, Dict, List, Union
|
12 |
-
|
13 |
import numpy as np
|
14 |
-
import pandas as pd
|
15 |
from sklearn.feature_extraction.text import (CountVectorizer, TfidfTransformer, HashingVectorizer,
|
16 |
TfidfVectorizer)
|
17 |
from sklearn.linear_model import LogisticRegression
|
18 |
-
from sklearn.metrics import f1_score
|
19 |
-
from sklearn.model_selection import train_test_split
|
20 |
-
from tqdm import tqdm
|
21 |
from lr.hyperparameters import SEARCH_SPACE, RandomSearch, HyperparameterSearch
|
22 |
-
from shutil import rmtree
|
23 |
-
|
24 |
|
25 |
def load_model(serialization_dir):
|
26 |
with open(os.path.join(serialization_dir, "best_hyperparameters.json"), 'r') as f:
|
|
|
1 |
import gradio as gr
|
|
|
|
|
|
|
2 |
import os
|
3 |
+
import json
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
import numpy as np
|
|
|
5 |
from sklearn.feature_extraction.text import (CountVectorizer, TfidfTransformer, HashingVectorizer,
|
6 |
TfidfVectorizer)
|
7 |
from sklearn.linear_model import LogisticRegression
|
|
|
|
|
|
|
8 |
from lr.hyperparameters import SEARCH_SPACE, RandomSearch, HyperparameterSearch
|
|
|
|
|
9 |
|
10 |
def load_model(serialization_dir):
|
11 |
with open(os.path.join(serialization_dir, "best_hyperparameters.json"), 'r') as f:
|
requirements.txt
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
scikit-learn
|
|
|
|
|
|
1 |
+
scikit-learn
|
2 |
+
numpy
|
3 |
+
gradio
|