Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -12,10 +12,10 @@ from projects.ML_StudentPerformance.ML_StudentPerformace import predict_student_
|
|
| 12 |
from projects.ML_DiabetesPrediction.ML_DiabetesPrediction import model_ML_DiabetesPrediction, form2
|
| 13 |
|
| 14 |
# Set the cache directory to a writable location
|
| 15 |
-
os.environ['TRANSFORMERS_CACHE'] = '/
|
| 16 |
|
| 17 |
# Make sure the directory exists
|
| 18 |
-
os.makedirs('/
|
| 19 |
|
| 20 |
# Initialize the pipeline with the new cache directory
|
| 21 |
pipe = pipeline("image-classification", model="wambugu71/crop_leaf_diseases_vit", cache_dir="/tmp/.cache")
|
|
|
|
| 12 |
from projects.ML_DiabetesPrediction.ML_DiabetesPrediction import model_ML_DiabetesPrediction, form2
|
| 13 |
|
| 14 |
# Set the cache directory to a writable location
|
| 15 |
+
os.environ['TRANSFORMERS_CACHE'] = '/tmp/.cache'
|
| 16 |
|
| 17 |
# Make sure the directory exists
|
| 18 |
+
os.makedirs('/tmp/.cache', exist_ok=True)
|
| 19 |
|
| 20 |
# Initialize the pipeline with the new cache directory
|
| 21 |
pipe = pipeline("image-classification", model="wambugu71/crop_leaf_diseases_vit", cache_dir="/tmp/.cache")
|