Spaces:
Configuration error
Configuration error
Sync App files
Browse files- README.md +0 -4
- app.py +8 -0
- requirements.txt +3 -2
README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
| 1 |
-
---
|
| 2 |
-
sdk: gradio
|
| 3 |
-
colorFrom: yellow
|
| 4 |
-
---
|
| 5 |
title: Drug Classification
|
| 6 |
emoji: 📉
|
| 7 |
colorFrom: purple
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
title: Drug Classification
|
| 2 |
emoji: 📉
|
| 3 |
colorFrom: purple
|
app.py
CHANGED
|
@@ -4,6 +4,14 @@ import skops.io as sio
|
|
| 4 |
import warnings
|
| 5 |
from sklearn.exceptions import InconsistentVersionWarning
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Suppress the version warnings
|
| 9 |
warnings.filterwarnings("ignore", category=InconsistentVersionWarning)
|
|
|
|
| 4 |
import warnings
|
| 5 |
from sklearn.exceptions import InconsistentVersionWarning
|
| 6 |
|
| 7 |
+
import subprocess
|
| 8 |
+
import sys
|
| 9 |
+
|
| 10 |
+
try:
|
| 11 |
+
import skops.io as sio
|
| 12 |
+
except ModuleNotFoundError:
|
| 13 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "skops"])
|
| 14 |
+
import skops.io as sio # Retry import after installation
|
| 15 |
|
| 16 |
# Suppress the version warnings
|
| 17 |
warnings.filterwarnings("ignore", category=InconsistentVersionWarning)
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
scikit-learn
|
| 2 |
-
|
| 3 |
-
|
|
|
|
| 1 |
+
--upgrade pip
|
| 2 |
scikit-learn
|
| 3 |
+
skops
|
| 4 |
+
gradio
|